summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-03-15 11:10:58 +0800
committerCheng-Han, Wu2016-03-15 11:10:58 +0800
commitea703145c55a61837f156175c7c69b4f35d8487d (patch)
tree80f61311d11a6a72ee8223d243255cff4bd36425
parent40f920619048c31e0035d8394647e1ac4628c310 (diff)
Fixed editor should not try to programmatically focus on mobile without click, touch or mouse events
Diffstat (limited to '')
-rw-r--r--public/js/index.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 0e34f9aa..e0213734 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -615,7 +615,10 @@ Visibility.change(function (e, state) {
}
} else {
if (wasFocus) {
- editor.focus();
+ if (!visibleXS) {
+ editor.focus();
+ editor.refresh();
+ }
wasFocus = false;
}
setHaveUnreadChanges(false);
@@ -915,10 +918,7 @@ function changeMode(type) {
ui.area.view.show();
break;
}
- if (currentMode != modeType.view && visibleLG) {
- //editor.focus();
- //editor.refresh();
- } else {
+ if (currentMode == modeType.view) {
editor.getInputField().blur();
}
if (currentMode == modeType.edit || currentMode == modeType.both) {
@@ -1536,7 +1536,7 @@ socket.on('refresh', function (data) {
currentMode = modeType.both;
}
changeMode(currentMode);
- if (nocontent) {
+ if (nocontent && !visibleXS) {
editor.focus();
editor.refresh();
}