jenkins-bot has submitted this change and it was merged.
Change subject: Restore focus to documentNode on convert
......................................................................
Restore focus to documentNode on convert
Since format dropdown tool is the only tool where we actually lose
focus to the documentNode, we must restore focus so that firefox
and chrome will display a cursor after converting content branches.
Bug: 50338
Change-Id: I4059b2688565570e0efc21078035775b7aed49e1
---
M modules/ve/ui/actions/ve.ui.FormatAction.js
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/ui/actions/ve.ui.FormatAction.js
b/modules/ve/ui/actions/ve.ui.FormatAction.js
index 0d5c6b7..fbd5c6c 100644
--- a/modules/ve/ui/actions/ve.ui.FormatAction.js
+++ b/modules/ve/ui/actions/ve.ui.FormatAction.js
@@ -68,6 +68,10 @@
}
selection = fragmentForSelection.getRange();
+ // Since format dropdown tool is a focusable menu, documentNode has
lost focus.
+ // Restore focus to documentNode so that firefox will display the
cursor after conversion.
+ this.surface.view.documentView.documentNode.$[0].focus();
+
txs = ve.dm.Transaction.newFromContentBranchConversion( doc, selection,
type, attributes );
surfaceModel.change( txs, selection );
};
--
To view, visit https://gerrit.wikimedia.org/r/71388
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4059b2688565570e0efc21078035775b7aed49e1
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits