From 1c1ffe4b8f53b3ae3ba67519db045ba61d080b97 Mon Sep 17 00:00:00 2001 From: josdejong Date: Fri, 15 Nov 2013 15:49:25 +0100 Subject: [PATCH] Fixed blocking of mouse scroll when context menu is visible --- jsoneditor/js/contextmenu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsoneditor/js/contextmenu.js b/jsoneditor/js/contextmenu.js index 8ee0aaf..a04f55c 100644 --- a/jsoneditor/js/contextmenu.js +++ b/jsoneditor/js/contextmenu.js @@ -217,8 +217,8 @@ ContextMenu.prototype.show = function (anchor) { } }); this.eventListeners.mousewheel = util.addEventListener( - document, 'mousewheel', function () { - // hide the menu on mouse scroll + document, 'mousewheel', function (event) { + // block scrolling when context menu is visible event.stopPropagation(); event.preventDefault(); });