loleaflet/src/map/handler/Map.Mouse.js |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2da5586a360a4068c385a5c3edc4dc28fa2d06b9
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Dec 12 11:32:12 2019 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Dec 12 11:35:07 2019 +0100

    Prevent fake doubleclick detection on Background color applying
    
    When selecting the highlight for a text only some attempts
    were successful because of detection the mouseup event two times
    in a short period of time (0-1 ms).
    
    Change-Id: Iafba078edbc4442921dc00b58829c5dbf4c2ed74

diff --git a/loleaflet/src/map/handler/Map.Mouse.js 
b/loleaflet/src/map/handler/Map.Mouse.js
index e18fc6ad5..21b884366 100644
--- a/loleaflet/src/map/handler/Map.Mouse.js
+++ b/loleaflet/src/map/handler/Map.Mouse.js
@@ -117,7 +117,8 @@ L.Map.Mouse = L.Handler.extend({
                        }
                        clearTimeout(this._holdMouseEvent);
                        this._holdMouseEvent = null;
-                       if (this._clickTime && Date.now() - this._clickTime <= 
250) {
+                       var timeDiff = Date.now() - this._clickTime;
+                       if (this._clickTime && timeDiff > 1 && timeDiff <= 250) 
{
                                // double click, a click was sent already
                                this._mouseEventsQueue = [];
                                this._clickCount++;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to