mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-09-23 10:26:26 +00:00
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:
parent
db6c6f636b
commit
c7e4545589
|
@ -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' ),
|
||||
|
|
Loading…
Reference in a new issue