mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-15 02:04:02 +00:00
Fix 'setSelection' in textSelection API
focus needs to come after setSelection Change-Id: Ib073ddad445e05c4bc042b9c382a7d74369e29e1
This commit is contained in:
parent
35593d526e
commit
9f566d6046
|
@ -50,8 +50,8 @@
|
|||
return codeMirror.doc.getSelection();
|
||||
},
|
||||
setSelection: function ( options ) {
|
||||
codeMirror.focus();
|
||||
codeMirror.doc.setSelection( codeMirror.doc.posFromIndex( options.start ), codeMirror.doc.posFromIndex( options.end ) );
|
||||
codeMirror.focus();
|
||||
return this;
|
||||
},
|
||||
replaceSelection: function ( value ) {
|
||||
|
|
Loading…
Reference in a new issue