diff --git a/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js b/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js index d8d86a69..9258a3c3 100644 --- a/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js +++ b/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js @@ -101,7 +101,7 @@ ve.ui.CodeMirrorAction.prototype.toggle = function ( enable ) { } ); // Account for the gutter width in the margin. - action.updateGutterWidth( doc.getDir() ); + action.updateGutterWidth( surfaceView.getDocument().getDir() ); // Set focus on the surface view. surfaceView.focus();