From: umherirrender Date: Wed, 24 Feb 2016 19:40:53 +0000 (+0100) Subject: Fix autofocus on Special:Activeusers X-Git-Tag: 1.31.0-rc.0~7842^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=bc5d873d76b6309e4f90bc999eaff0732e123a38;p=lhc%2Fweb%2Fwiklou.git Fix autofocus on Special:Activeusers Xml::inputLabel does not know about boolean parameters like autofocus, so add it with an empty value or omitted it. Fix validation error: Bad value 1 for attribute autofocus on element input. Change-Id: Idb7a7b58079d6c44b5a7f1fa226218bb685c8241 --- diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index c06db01cbe..9c5fc2f973 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -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' => '' ] : [] + ) ) . '
'; $out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' )->text(),