Skip to content

Commit ea70314

Browse files
committed
Fixed editor should not try to programmatically focus on mobile without click, touch or mouse events
1 parent 40f9206 commit ea70314

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

public/js/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,10 @@ Visibility.change(function (e, state) {
615615
}
616616
} else {
617617
if (wasFocus) {
618-
editor.focus();
618+
if (!visibleXS) {
619+
editor.focus();
620+
editor.refresh();
621+
}
619622
wasFocus = false;
620623
}
621624
setHaveUnreadChanges(false);
@@ -915,10 +918,7 @@ function changeMode(type) {
915918
ui.area.view.show();
916919
break;
917920
}
918-
if (currentMode != modeType.view && visibleLG) {
919-
//editor.focus();
920-
//editor.refresh();
921-
} else {
921+
if (currentMode == modeType.view) {
922922
editor.getInputField().blur();
923923
}
924924
if (currentMode == modeType.edit || currentMode == modeType.both) {
@@ -1536,7 +1536,7 @@ socket.on('refresh', function (data) {
15361536
currentMode = modeType.both;
15371537
}
15381538
changeMode(currentMode);
1539-
if (nocontent) {
1539+
if (nocontent && !visibleXS) {
15401540
editor.focus();
15411541
editor.refresh();
15421542
}

0 commit comments

Comments
 (0)