• Resolved alexbuznik

    (@alexbuznik)


    Hi.
    I installed the plugin and set it to invisible mode. Keys tested fine, all’s ok.

    But on the login screen I want to enter my username, tab to password field, tab to ‘remember me’ and then hit enter to login.
    However with this plugin, the next tab after password focuses on the google privacy link or something and when I click enter I open some shitty page.

    Is this fixable?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi!

    Please provide a link to the page where the problem occurs.

    Thread Starter alexbuznik

    (@alexbuznik)

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    You can add the below mentioned function in function.php of your active theme.

    function Is_Backend_LOGIN(){
       $ABSPATH_MY = str_replace(array('\\','/'), DIRECTORY_SEPARATOR, ABSPATH);
       return ((in_array($ABSPATH_MY.'wp-login.php', get_included_files()) || in_array($ABSPATH_MY.'wp-register.php', get_included_files()) ) || $GLOBALS['pagenow'] === 'wp-login.php' || $_SERVER['PHP_SELF']== '/wp-login.php');
    }
    
    if(Is_Backend_LOGIN()){
      ?><script type="text/javascript">
           $("#user_login").attr('tabindex',1);
           $("#user_pass").attr('tabindex',2);
           $("#rememberme").attr('tabindex',3);
           $("#nav").attr('tabindex',4);
           $(".rc-anchor-pt a").attr('tabindex',5);
           $(".rc-anchor-pt a").attr('tabindex',6);
           $("#wp-submit").attr('tabindex',7);
      </script><?php
    }

    Hope this will helps you.

    Thanks!

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi @alexbuznik,

    Please try to add the following code to the functions.php of your theme:

    add_action( 'login_footer', function() { ?>
      <script type="text/javascript">
          (function($) {
             var tabindex = 0;
            $("input").not(':hidden').each( function() {
              $(this).attr('tabindex',++ tabindex);
            });
          })(jQuery);
      </script>
    <?php } );
    Thread Starter alexbuznik

    (@alexbuznik)

    Guys, thank you for advice.
    I understand the issue and can fix it.

    But the question is to @bestwebsoft – are you going to integrate a fix somehow to the plugin?

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi @alexbuznik,

    We’ll think about that.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Steals tabindex for login screen’ is closed to new replies.