mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 14:15:47 +01:00
Fix Customize Toolbar with toolbar.customization.usesheet=true. Closes issue #379.
This commit is contained in:
@@ -1232,10 +1232,11 @@ var Events = Module("events", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
popupshown: function onPopupShown(event) {
|
popupshown: function onPopupShown(event) {
|
||||||
if (event.originalTarget.localName !== "tooltip" && event.originalTarget.id !== "dactyl-visualbell")
|
let elem = event.originalTarget;
|
||||||
if (Events.isHidden(event.originalTarget)) {
|
if (elem.localName !== "tooltip" && elem.id !== "dactyl-visualbell")
|
||||||
if (event.originalTarget.hidePopup)
|
if (Events.isHidden(elem)) {
|
||||||
event.originalTarget.hidePopup();
|
if (elem.hidePopup && Events.isHidden(elem.parentNode))
|
||||||
|
elem.hidePopup();
|
||||||
}
|
}
|
||||||
else if (modes.main != modes.MENU)
|
else if (modes.main != modes.MENU)
|
||||||
modes.push(modes.MENU);
|
modes.push(modes.MENU);
|
||||||
@@ -1357,11 +1358,12 @@ var Events = Module("events", {
|
|||||||
let (key = isString(event) ? event : events.toString(event))
|
let (key = isString(event) ? event : events.toString(event))
|
||||||
key === "<Esc>" || key === "<C-[>",
|
key === "<Esc>" || key === "<C-[>",
|
||||||
|
|
||||||
isHidden: function isHidden(elem, despotic) {
|
isHidden: function isHidden(elem, aggressive) {
|
||||||
for (let e = elem; e instanceof Element; e = e.parentNode)
|
for (let e = elem; e instanceof Element; e = e.parentNode) {
|
||||||
if (util.computedStyle(e).visibility !== "visible" ||
|
if (util.computedStyle(e).visibility !== "visible" ||
|
||||||
despotic && e.boxObject && e.boxObject.height === 0)
|
aggressive && e.boxObject && e.boxObject.height === 0)
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user