summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGökay Şatır <gokaysatir@collabora.com>2020-12-09 21:51:09 +0300
committerGökay Şatır <gokaysatir@collabora.com>2020-12-09 21:51:09 +0300
commitd709f1968257bd051192969f8b9d2c3798a71644 (patch)
tree173d8192692be42cfe72ccce2ae5da9368fd3721
parentWriter: Revert commit https://github.com/CollaboraOnline/online/pull/469 (diff)
downloadonline-private/gokay/comments.tar.gz
online-private/gokay/comments.zip
Writer: Keep focus on comment box. private/gokay/comments
Users are now able to continue writing their comment when the comment list is refreshed Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I57a2c1a41af4585bb62dd03ef5c6db2a5602de31
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 6c2c0d600c..d8525380cb 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2409,7 +2409,10 @@ L.TileLayer = L.GridLayer.extend({
if (!window.mobileWizard && !window.pageMobileWizard && !window.insertionMobileWizard) {
// If the user is editing, show the keyboard, but don't change
// anything if nothing is changed.
- this._map.focus(true);
+
+ // We will focus map if no comment is being edited (writer only for now).
+ if (this._docType === 'text' && (this._annotations._selected === null || !this._annotations._selected.isEdit()))
+ this._map.focus(true);
}
} else {
this._map._textInput.hideCursor();