Mooeypoo has uploaded a new change for review.
https://gerrit.wikimedia.org/r/231310
Change subject: Focus the editor on switch
......................................................................
Focus the editor on switch
The editor should focus after the promises were resolved so nothing
else steals its focus.
Bug: T97290
Change-Id: Iec72f63c2b324512f98006be0ba3dbbe7a1845c6
---
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/10/231310/1
diff --git a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
index 0efbb80..70ae22c 100644
--- a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
+++ b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
@@ -250,12 +250,13 @@
widget.$element.append( newEditor.$element );
newEditor.toggle( true );
- if ( widget.autoFocus ) {
- newEditor.focus();
- }
switchingDeferred.resolve();
widget.switchingPromise = null;
+
+ if ( widget.autoFocus ) {
+ newEditor.focus();
+ }
} )
.fail( function ( error ) {
widget.activeEditorName = oldName;
--
To view, visit https://gerrit.wikimedia.org/r/231310
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec72f63c2b324512f98006be0ba3dbbe7a1845c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits