nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 32006e015cbaa4fcb26e927488bba817b1d2f9ce
parent 3eb92f526ebf677a2332d8b1ce4e446b6db11804
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Tue, 25 Apr 2017 23:11:47 +0300

[contextmenu] fixed removing menu on touch

Diffstat:
Msrc/lib/contextmenu/index.js | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/lib/contextmenu/index.js b/src/lib/contextmenu/index.js @@ -49,6 +49,7 @@ class Contextmenu { window.addEventListener('keydown', this.onKeyDown, true); window.addEventListener('mousedown', this.onMouseDown, true); + window.addEventListener('touchstart', this.onMouseDown, true); for (let item of this.createItems()) { container.appendChild(item); @@ -65,6 +66,7 @@ class Contextmenu { window.removeEventListener('keydown', this.onKeyDown, true); window.removeEventListener('mousedown', this.onMouseDown, true); + window.removeEventListener('touchstart', this.onMouseDown, true); } onKeyDown = (e) => {