mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 23:44:11 +01:00
Don't close the completion list when leaving command-line mode (e.g., opening the context menu). Fix :pageinfo (which currently lacks a unit test).
--HG-- branch : key-processing
This commit is contained in:
@@ -172,13 +172,14 @@ var MOW = Module("mow", {
|
||||
},
|
||||
contextEvents: {
|
||||
popupshowing: function (event) {
|
||||
let menu = commandline.widgets.contextMenu;
|
||||
let enabled = {
|
||||
link: window.document.popupNode instanceof HTMLAnchorElement,
|
||||
path: window.document.popupNode.hasAttribute("path"),
|
||||
selection: !window.document.commandDispatcher.focusedWindow.getSelection().isCollapsed
|
||||
};
|
||||
|
||||
for (let node in array.iterValues(event.target.children)) {
|
||||
for (let node in array.iterValues(menu.children)) {
|
||||
let group = node.getAttributeNS(NS, "group");
|
||||
node.hidden = group && !group.split(/\s+/).every(function (g) enabled[g]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user