Special:Contribs: autofocus to 'target' if target hasn't been specified or in non...
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 81668e1..5f7c587 100644 (file)
@@ -517,8 +517,13 @@ class SpecialContributions extends IncludableSpecialPage {
                                        'mw-ui-input-inline',
                                        'mw-autocomplete-user', // used by mediawiki.userSuggest
                                ),
-                       ) + ( $this->opts['target'] ? array() : array( 'autofocus' ) )
+                       ) + (
+                               // Only autofocus if target hasn't been specified or in non-newbies mode
+                               ( $this->opts['contribs'] === 'newbie' || $this->opts['target'] )
+                                       ? array() : array( 'autofocus' => true )
+                               )
                );
+
                $targetSelection = Html::rawElement(
                        'td',
                        array( 'colspan' => 2 ),