summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-04-02 08:09:28 -0400
committerAndras Timar <andras.timar@collabora.com>2020-04-02 18:16:35 +0200
commit151a2ac08d2cc82020328b83e039cb8608222738 (patch)
tree2aeb5e242b56cf9bb2d4429eefc33a1b26517f44
parent69e8ff86bab99440fe43d957be41d168f5616072 (diff)
leaflet: maintain focus when searching
When the focus is in the search box, we shouldn't lose it, or hide the keyboard. Change-Id: I05c4c3e384d840b2919106af1063978b6fe7fbfe Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91580 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 04b0a7b651bc2d7f98b843b08c402411641513a3) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91515 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index bfac945ab..f0b540de9 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2207,7 +2207,8 @@ L.TileLayer = L.GridLayer.extend({
}
} else {
this._map._textInput.hideCursor();
- if (this._map.editorHasFocus()) // Allow input if a dialog has the focus.
+ // Maintain input if a dialog or search-box has the focus.
+ if (this._map.editorHasFocus() && !this._map.isSearching())
this._map.focus(false);
}
},