tdf#132125: leaflet: Pasting text into comments pastes into the document instead
Change-Id: Ibfc3a4519da13dfbe12082a4cd98b7a0060d3838
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97108
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
diff --git a/loleaflet/src/map/Clipboard.js b/loleaflet/src/map/Clipboard.js
index 53c6236..ede4484 100644
--- a/loleaflet/src/map/Clipboard.js
+++ b/loleaflet/src/map/Clipboard.js
@@ -3,7 +3,7 @@
* L.Clipboard is used to abstract our storage and management of
* local & remote clipboard data.
*/
/* global _ vex brandProductName isAnyVexDialogActive */
/* global _ vex brandProductName isAnyVexDialogActive $ */
// Get all interesting clipboard related events here, and handle
// download logic in one place ...
@@ -681,6 +681,9 @@ L.Clipboard = L.Class.extend({
if (isAnyVexDialogActive() && !this._map.hasFocus())
return;
if ($('.annotation-active').length > 0 && !this._map.hasFocus())
return;
// If the focus is in the search box, paste there.
if (this._map.isSearching())
return;