|
@@ -230,10 +230,10 @@ class CodeMirrorEditor extends AbstractEditor {
|
|
|
* @inheritDoc
|
|
* @inheritDoc
|
|
|
*/
|
|
*/
|
|
|
forceToFocus() {
|
|
forceToFocus() {
|
|
|
- const editor = this.getCodeMirror();
|
|
|
|
|
// use setInterval with reluctance -- 2018.01.11 Yuki Takei
|
|
// use setInterval with reluctance -- 2018.01.11 Yuki Takei
|
|
|
const intervalId = setInterval(() => {
|
|
const intervalId = setInterval(() => {
|
|
|
- this.getCodeMirror().focus();
|
|
|
|
|
|
|
+ const editor = this.getCodeMirror();
|
|
|
|
|
+ editor.focus();
|
|
|
if (editor.hasFocus()) {
|
|
if (editor.hasFocus()) {
|
|
|
clearInterval(intervalId);
|
|
clearInterval(intervalId);
|
|
|
// refresh
|
|
// refresh
|