diff --git a/browser/src/control/Control.ContextMenu.js b/browser/src/control/Control.ContextMenu.js index aecb8a6fe7d7..4bd4f83e5f9b 100644 --- a/browser/src/control/Control.ContextMenu.js +++ b/browser/src/control/Control.ContextMenu.js @@ -204,6 +204,12 @@ L.Control.ContextMenu = L.Control.extend({ var $menu = opt.$menu; $menu.attr('tabindex', 0); // Make the context menu focusable }, + activated: function (opt) { + if (autoFillContextMenu) { + var $layer = opt.$layer; + $layer.css('pointer-events', 'none'); // disable mouse clicks for the layer + } + }, hide: function() { if(autoFillContextMenu) app.map._docLayer._resetReferencesMarks(); diff --git a/browser/src/control/jsdialog/Util.Dropdown.js b/browser/src/control/jsdialog/Util.Dropdown.js index 19052d3fbfa5..6f011e0637bb 100644 --- a/browser/src/control/jsdialog/Util.Dropdown.js +++ b/browser/src/control/jsdialog/Util.Dropdown.js @@ -154,6 +154,9 @@ JSDialog.OpenDropdown = function (id, popupParent, entries, innerCallback, popup }; }; L.Map.THIS.fire('jsdialog', {data: json, callback: generateCallback(entries)}); + + L.Map.THIS.fire('closepopups'); // close popups if a dropdown menu is opened + L.Map.THIS._docLayer._resetReferencesMarks(); }; JSDialog.CloseDropdown = function (id) {