mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
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
This commit is contained in:
parent
c75e379086
commit
beadbba79b
|
@ -68,6 +68,10 @@ ve.ui.FormatAction.prototype.convert = function ( type, attributes ) {
|
||||||
}
|
}
|
||||||
selection = fragmentForSelection.getRange();
|
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 );
|
txs = ve.dm.Transaction.newFromContentBranchConversion( doc, selection, type, attributes );
|
||||||
surfaceModel.change( txs, selection );
|
surfaceModel.change( txs, selection );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue