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:
MusikAnimal 2024-11-18 23:09:12 -05:00
parent 5d6d0ba56a
commit 2710eade97

View file

@ -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();