[Libreoffice-commits] online.git: loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Wed Mar 21 16:11:20 UTC 2018


 loleaflet/src/control/Control.LokDialog.js |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 82ec19069290b05e7980b39ba8d7413802ae61ba
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Tue Mar 20 15:08:59 2018 +0530

    Don't bore the map while user is playing with the dialog
    
    Change-Id: I2aa466ec66b71fc7d65218a200638de142e99eea

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index f8de108bf..15dea5e2b 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -236,8 +236,6 @@ L.Control.LokDialog = L.Control.extend({
 		dialogCanvas.height = height;
 		dialogCanvas.id = strDlgId + '-canvas';
 
-		L.DomEvent.on(dialogCanvas, 'contextmenu', L.DomEvent.preventDefault);
-
 		var that = this;
 		$(dialogContainer).dialog({
 			width: width,
@@ -266,6 +264,10 @@ L.Control.LokDialog = L.Control.extend({
 		this._createDialogCursor(strDlgId);
 		var dlgInput = this._createDialogInput(strDlgId);
 
+		L.DomEvent.on(dialogCanvas, 'contextmenu', L.DomEvent.preventDefault);
+		L.DomEvent.on(dialogCanvas, 'mousemove', function() {
+			this._map.lastActiveTime = Date.now();
+		}, this);
 		L.DomEvent.on(dialogCanvas, 'mousedown mouseup', function(e) {
 			var buttons = 0;
 			buttons |= e.button === map['mouse'].JSButtons.left ? map['mouse'].LOButtons.left : 0;


More information about the Libreoffice-commits mailing list