mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 934532 - [Australis] clicking in a blank area of the panel shouldn't close it, r=jaws
This commit is contained in:
parent
81ed5c9b26
commit
8419732291
@ -1084,19 +1084,23 @@ let CustomizableUIInternal = {
|
||||
/*
|
||||
* If people put things in the panel which need more than single-click interaction,
|
||||
* we don't want to close it. Right now we check for text inputs and menu buttons.
|
||||
* Anything else we should take care of?
|
||||
* We also check for being outside of any toolbaritem/toolbarbutton, ie on a blank
|
||||
* part of the menu.
|
||||
*/
|
||||
_isOnInteractiveElement: function(aEvent) {
|
||||
let target = aEvent.originalTarget;
|
||||
let panel = aEvent.currentTarget;
|
||||
let panel = this._getPanelForNode(aEvent.currentTarget);
|
||||
let inInput = false;
|
||||
let inMenu = false;
|
||||
while (!inInput && !inMenu && target != aEvent.currentTarget) {
|
||||
inInput = target.localName == "input";
|
||||
let inItem = false;
|
||||
while (!inInput && !inMenu && !inItem && target != panel) {
|
||||
let tagName = target.localName;
|
||||
inInput = tagName == "input";
|
||||
inMenu = target.type == "menu";
|
||||
inItem = tagName == "toolbaritem" || tagName == "toolbarbutton";
|
||||
target = target.parentNode;
|
||||
}
|
||||
return inMenu || inInput;
|
||||
return inMenu || inInput || !inItem;
|
||||
},
|
||||
|
||||
hidePanelForNode: function(aNode) {
|
||||
|
Loading…
Reference in New Issue
Block a user