VE: Refresh rendering after surfaceReady

Bug: T188215
Change-Id: I4c53f554d8091aa71ce59fe04857b588209639d3
This commit is contained in:
Ed Sanders 2018-02-25 17:58:17 +00:00
parent a1c1164c0d
commit 8b27277b20

View file

@ -87,6 +87,12 @@ ve.ui.CodeMirrorAction.prototype.toggle = function ( enable ) {
this.onLangChange(); this.onLangChange();
ve.init.target.once( 'surfaceReady', function () {
if ( surface.mirror ) {
surface.mirror.refresh();
}
} );
} else if ( surface.mirror && enable !== true ) { } else if ( surface.mirror && enable !== true ) {
doc.off( 'precommit', surface.mirror.veTransactionListener ); doc.off( 'precommit', surface.mirror.veTransactionListener );
surfaceView.getDocument().off( 'langChange', surface.mirror.veLangChangeListener ); surfaceView.getDocument().off( 'langChange', surface.mirror.veLangChangeListener );