When open Special:UserRights with a valid user as target, there is no
need to set the autofocus on the input field. Just set it on blank input
and error input (such as non existing user or ip).
Change-Id: I14b005b83adbbd899d2846c8d71cbfb1a1a25ad7
30,
str_replace( '_', ' ', $this->mTarget ),
array(
- 'autofocus' => '',
'class' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
+ ) + (
+ // Set autofocus on blank input and error input
+ $this->mFetchedUser === null ? array( 'autofocus' => '' ) : array()
)
) . ' ' .
Xml::submitButton( $this->msg( 'editusergroup' )->text() ) .