summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-04-02 10:05:15 -0400
committerAndras Timar <andras.timar@collabora.com>2020-04-02 18:15:59 +0200
commit69e8ff86bab99440fe43d957be41d168f5616072 (patch)
tree64e1b25b0551135a615cfbb74717c6465c6e85f5
parenteef4edf8f6e454e607f4d3bc80af8d31c15e10df (diff)
leaflet: support pasting in the search box
When pasting into the document a special handler is used to manage the transfer of data. For the search box we need to let the default handler do the right thing and so we check that we aren't searching before we override the paste handler logic, which explicitly pastes into the doc. Change-Id: I570168d1aaf70c2a78403644e006ba9625ec68db Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91581 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit f96126fb69ff8feb3b5de6c55310f9926b89bf44) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91514 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--loleaflet/src/map/Clipboard.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/loleaflet/src/map/Clipboard.js b/loleaflet/src/map/Clipboard.js
index 68e5e4b1c..160a0273d 100644
--- a/loleaflet/src/map/Clipboard.js
+++ b/loleaflet/src/map/Clipboard.js
@@ -657,6 +657,10 @@ L.Clipboard = L.Class.extend({
if (isAnyVexDialogActive() && !this._map.hasFocus())
return;
+ // If the focus is in the search box, paste there.
+ if (this._map.isSearching())
+ return;
+
if (this._map._activeDialog)
ev.usePasteKeyEvent = true;