Fix autofocus on Special:Activeusers
[lhc/web/wiklou.git] / 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(),