Merge "Fix autofocus on Special:Activeusers"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 25 Feb 2016 06:14:08 +0000 (06:14 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 25 Feb 2016 06:14:08 +0000 (06:14 +0000)
includes/specials/SpecialActiveusers.php

index c06db01..9c5fc2f 100644 (file)
@@ -223,8 +223,10 @@ class ActiveUsersPager extends UsersPager {
                        [
                                'class' => 'mw-ui-input-inline mw-autocomplete-user',
                                'tabindex' => 1,
-                               'autofocus' => $this->requestedUser === '',
-                       ]
+                       ] + (
+                               // Set autofocus on blank input
+                               $this->requestedUser === '' ? [ 'autofocus' => '' ] : []
+                       )
                ) . '<br />';
 
                $out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' )->text(),