From 781388f202fd5a3b300cdf300c03b7cfa10ae629 Mon Sep 17 00:00:00 2001 From: Marius Hoch Date: Tue, 1 Jan 2013 22:44:53 +0100 Subject: [PATCH] (bug 43560) Initial input focus on Special:ListUsers isn't set Set the input focus on Special:ListUsers to the user name field in case no user name was given as input. Change-Id: I13b75baf95bac8d25b019a82e9f8504cfa779b96 --- includes/specials/SpecialListusers.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index ea598c3687..5787595726 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -218,7 +218,16 @@ class UsersPager extends AlphabeticPager { # Username field $out .= Xml::label( $this->msg( 'listusersfrom' )->text(), 'offset' ) . ' ' . - Xml::input( 'username', 20, $this->requestedUser, array( 'id' => 'offset' ) ) . ' '; + Html::input( + 'username', + $this->requestedUser, + 'text', + array( + 'id' => 'offset', + 'size' => 20, + 'autofocus' => $this->requestedUser === '' + ) + ) . ' '; # Group drop-down list $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ' . -- 2.20.1