mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
ve.ui.CodeMirrorAction.v6: Use direction of surface view, not model view
This fixes an issue where the VE document model is incorrectly used in computing gutter width based on directionality. It should instead be the VE surface view's direction, in the event the user the is editing in RTL on a LTR document. See T374196#10311711. Bug: T374196 Follow-Up: I81e863e19d6d0bad2cc2be743df896e17a8dc548 Change-Id: Ic37d1004e9606dc2d29d98d29f28743202dd5683
This commit is contained in:
parent
5d6d0ba56a
commit
2710eade97
|
@ -101,7 +101,7 @@ ve.ui.CodeMirrorAction.prototype.toggle = function ( enable ) {
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Account for the gutter width in the margin.
|
// Account for the gutter width in the margin.
|
||||||
action.updateGutterWidth( doc.getDir() );
|
action.updateGutterWidth( surfaceView.getDocument().getDir() );
|
||||||
|
|
||||||
// Set focus on the surface view.
|
// Set focus on the surface view.
|
||||||
surfaceView.focus();
|
surfaceView.focus();
|
||||||
|
|
Loading…
Reference in a new issue