diff --git a/browser/src/control/Control.ContextMenu.js b/browser/src/control/Control.ContextMenu.js index a32e8d7fe336..aecb8a6fe7d7 100644 --- a/browser/src/control/Control.ContextMenu.js +++ b/browser/src/control/Control.ContextMenu.js @@ -249,6 +249,11 @@ L.Control.ContextMenu = L.Control.extend({ continue; } + // If the command was hidden with the Hide_Command postmessage... + if (this._map.uiManager.hiddenCommands[item.command]) { + continue; + } + // reduce Paste Special submenu if (item.type === 'menu' && item.text && item.text.replace('~', '') === 'Paste Special' && item.menu && item.menu.length) {