Esanders has uploaded a new change for review.
https://gerrit.wikimedia.org/r/141940
Change subject: Revert "Accessibility: Restore element focus when a window
closes"
......................................................................
Revert "Accessibility: Restore element focus when a window closes"
This break VE dialogs as we already restore selection to the correct place with
fragment.select(). Focus just resets the selection to 0.
Bug: 66855
This reverts commit 0447150c57c76da7b739c95b4706eaf515119a7c.
Change-Id: I6d17eeff8473d47a1e5a2cd53e73de734c45ff2c
---
M src/Window.js
1 file changed, 0 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/40/141940/1
diff --git a/src/Window.js b/src/Window.js
index 5e868a7..f4bd306 100644
--- a/src/Window.js
+++ b/src/Window.js
@@ -384,10 +384,6 @@
// Open the window
this.opening = $.Deferred();
-
- // So we can restore focus on closing
- this.$prevFocus = $( document.activeElement );
-
this.frame.load().done( OO.ui.bind( function () {
this.$element.show();
this.visible = true;
@@ -451,11 +447,6 @@
this.opened.resolve();
}
this.$element.hide();
- // Restore focus to whatever was focused before opening
- if ( this.$prevFocus ) {
- this.$prevFocus.focus();
- this.$prevFocus = undefined;
- }
this.visible = false;
this.closing.resolve();
// Now that we are totally done closing, it's safe to allow
opening
--
To view, visit https://gerrit.wikimedia.org/r/141940
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d17eeff8473d47a1e5a2cd53e73de734c45ff2c
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits