Focus before setting the cursor/selection

Bug: T197263
Change-Id: If5efed656746e3e40fcda118e487cdcb00e0114a
This commit is contained in:
Derk-Jan Hartman 2018-06-17 18:10:24 +02:00 committed by Niharika29
parent f22a530f7c
commit 4ebe54a588

View file

@ -66,8 +66,8 @@
return codeMirror.doc.getSelection();
},
setSelection: function ( options ) {
codeMirror.doc.setSelection( codeMirror.doc.posFromIndex( options.start ), codeMirror.doc.posFromIndex( options.end ) );
codeMirror.focus();
codeMirror.doc.setSelection( codeMirror.doc.posFromIndex( options.start ), codeMirror.doc.posFromIndex( options.end ) );
return this;
},
replaceSelection: function ( value ) {