From dc33aa9e7b13058d3805377bbe22ee05d4856597 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Wed, 27 Jun 2018 16:51:32 +0200
Subject: [PATCH] menu is closed on any touchstart that is not on the menu

---
 frontend-js/src/main/js/gui/ContextMenu.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/frontend-js/src/main/js/gui/ContextMenu.js b/frontend-js/src/main/js/gui/ContextMenu.js
index 65573410e5..4425389f92 100644
--- a/frontend-js/src/main/js/gui/ContextMenu.js
+++ b/frontend-js/src/main/js/gui/ContextMenu.js
@@ -36,6 +36,7 @@ function ContextMenu(params) {
     }
   };
   $(document).on('click', self._documentClickListener);
+  $(document).on('touchstart', self._documentClickListener);
 }
 
 ContextMenu.prototype = Object.create(AbstractGuiElement.prototype);
@@ -44,6 +45,7 @@ ContextMenu.prototype.constructor = ContextMenu;
 ContextMenu.prototype.destroy = function () {
   var self = this;
   $(document).off('click', self._documentClickListener);
+  $(document).off('touchstart', self._documentClickListener);
 };
 
 ContextMenu.prototype.addOption = function (name, handler, disabled) {
-- 
GitLab