mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Focus before setting the cursor/selection
Bug: T197263 Change-Id: If5efed656746e3e40fcda118e487cdcb00e0114a
This commit is contained in:
parent
f22a530f7c
commit
4ebe54a588
|
@ -66,8 +66,8 @@
|
||||||
return codeMirror.doc.getSelection();
|
return codeMirror.doc.getSelection();
|
||||||
},
|
},
|
||||||
setSelection: function ( options ) {
|
setSelection: function ( options ) {
|
||||||
codeMirror.doc.setSelection( codeMirror.doc.posFromIndex( options.start ), codeMirror.doc.posFromIndex( options.end ) );
|
|
||||||
codeMirror.focus();
|
codeMirror.focus();
|
||||||
|
codeMirror.doc.setSelection( codeMirror.doc.posFromIndex( options.start ), codeMirror.doc.posFromIndex( options.end ) );
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
replaceSelection: function ( value ) {
|
replaceSelection: function ( value ) {
|
||||||
|
|
Loading…
Reference in a new issue