Focus ULS button when the language menu is closed with Escape (#468)
Before this, the focus would return to the <body> element (i.e. at the very top of the document) when you hit the Escape key, instead of the ULS button, so if you were navigating with the keyboard, you would have to tab through all preceding focusable elements before you got back to the language button (and beyond). Bug: https://phabricator.wikimedia.org/T325009
This commit is contained in:
@@ -328,6 +328,7 @@
|
|||||||
|
|
||||||
if ( e.keyCode === 27 ) { // escape
|
if ( e.keyCode === 27 ) { // escape
|
||||||
this.cancel();
|
this.cancel();
|
||||||
|
this.$element.focus();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user