mirror of https://github.com/status-im/codimd.git
Fixed editor should not try to programmatically focus on mobile without click, touch or mouse events
This commit is contained in:
parent
40f9206190
commit
ea703145c5
|
@ -615,7 +615,10 @@ Visibility.change(function (e, state) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (wasFocus) {
|
if (wasFocus) {
|
||||||
|
if (!visibleXS) {
|
||||||
editor.focus();
|
editor.focus();
|
||||||
|
editor.refresh();
|
||||||
|
}
|
||||||
wasFocus = false;
|
wasFocus = false;
|
||||||
}
|
}
|
||||||
setHaveUnreadChanges(false);
|
setHaveUnreadChanges(false);
|
||||||
|
@ -915,10 +918,7 @@ function changeMode(type) {
|
||||||
ui.area.view.show();
|
ui.area.view.show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (currentMode != modeType.view && visibleLG) {
|
if (currentMode == modeType.view) {
|
||||||
//editor.focus();
|
|
||||||
//editor.refresh();
|
|
||||||
} else {
|
|
||||||
editor.getInputField().blur();
|
editor.getInputField().blur();
|
||||||
}
|
}
|
||||||
if (currentMode == modeType.edit || currentMode == modeType.both) {
|
if (currentMode == modeType.edit || currentMode == modeType.both) {
|
||||||
|
@ -1536,7 +1536,7 @@ socket.on('refresh', function (data) {
|
||||||
currentMode = modeType.both;
|
currentMode = modeType.both;
|
||||||
}
|
}
|
||||||
changeMode(currentMode);
|
changeMode(currentMode);
|
||||||
if (nocontent) {
|
if (nocontent && !visibleXS) {
|
||||||
editor.focus();
|
editor.focus();
|
||||||
editor.refresh();
|
editor.refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue