Fix 'setSelection' in textSelection API

focus needs to come after setSelection

Change-Id: Ib073ddad445e05c4bc042b9c382a7d74369e29e1
This commit is contained in:
Ed Sanders 2020-04-07 12:59:05 +01:00 committed by Jforrester
parent 35593d526e
commit 9f566d6046

View file

@ -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 ) {