mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Ensure CM surface can't be edited in VE mode
CM surface is just for presentation, it shouldn't be possible to focus or select anything in the surface, so in addition to it being beneath the VE surface, disable it through the CM API and disable pointer-events with CSS. Bug: T170170 Change-Id: Ief49c293f514e22bc6db5eebb3a11c1bc695432d
This commit is contained in:
parent
c6ccd44f95
commit
91397eb556
|
@ -11,6 +11,7 @@
|
|||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
pointer-events: none;
|
||||
|
||||
padding: 0 1.14286em; /* 1/0.875 */
|
||||
@media screen and ( min-width: 982px ) {
|
||||
|
|
|
@ -46,6 +46,7 @@ ve.ui.CodeMirrorAction.prototype.toggle = function ( enable ) {
|
|||
surface.mirror = CodeMirror( surfaceView.$element[ 0 ], {
|
||||
value: surface.getDom(),
|
||||
mwConfig: mw.config.get( 'extCodeMirrorConfig' ),
|
||||
readOnly: 'nocursor',
|
||||
lineWrapping: true,
|
||||
tabSize: 1,
|
||||
scrollbarStyle: 'null',
|
||||
|
|
Loading…
Reference in a new issue