Set autofocus on Special:Unblock
Replaced the tabindex=1 with autofocus to have the cursor in the target field. This is than also the start for tabs and therefor no tabindex is needed. In case of a valid block the autofocus is moved to the reason field, because the target field gets hidden. Change-Id: I1c35f546ad22907ab824b6c51fd65655f1a91a96
This commit is contained in:
parent
040060e2b7
commit
018ae52460
1 changed files with 4 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ class SpecialUnblock extends SpecialPage {
|
|||
'Target' => array(
|
||||
'type' => 'text',
|
||||
'label-message' => 'ipaddressorusername',
|
||||
'tabindex' => '1',
|
||||
'autofocus' => true,
|
||||
'size' => '45',
|
||||
'required' => true,
|
||||
),
|
||||
|
|
@ -131,6 +131,9 @@ class SpecialUnblock extends SpecialPage {
|
|||
$fields['Target']['default'] = "#{$this->target}";
|
||||
break;
|
||||
}
|
||||
// target is hidden, so the reason is the first element
|
||||
$fields['Target']['autofocus'] = false;
|
||||
$fields['Reason']['autofocus'] = true;
|
||||
}
|
||||
} else {
|
||||
$fields['Target']['default'] = $this->target;
|
||||
|
|
|
|||
Loading…
Reference in a new issue