mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 23:50:05 +00:00
VE: Refresh rendering after surfaceReady
Bug: T188215 Change-Id: I4c53f554d8091aa71ce59fe04857b588209639d3
This commit is contained in:
parent
a1c1164c0d
commit
8b27277b20
|
@ -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 );
|
||||||
|
|
Loading…
Reference in a new issue