Toolbar: ignore modifications on readonly textarea

CodeMirror forces WikiEditor to load. While CodeMirror handles readonly
textareas, the WikiEditor toolbar doesn't. CodeMirror and
syntaxhighlighting is pretty useful in readonly actually,
so I'm making WikiEditor a tad more resistent against readonly mode.

Bug: T188817
Change-Id: I927a780e1aea86a19750387f530bad84b1ff5ef4
This commit is contained in:
Derk-Jan Hartman 2018-11-14 16:56:43 +01:00 committed by TheDJ
parent db6c6f636b
commit c7e4545589

View file

@ -245,6 +245,9 @@
switch ( action.type ) {
case 'replace':
case 'encapsulate':
if ( context.$textarea.prop( 'readonly' ) ) {
break;
}
parts = {
pre: $.wikiEditor.autoMsg( action.options, 'pre' ),
peri: $.wikiEditor.autoMsg( action.options, 'peri' ),