Bug 1182643 - [Control Center] Fix non-e10s issues with panel focus and hiding r=Gijs

This commit is contained in:
Tim Taubert 2015-07-13 16:10:13 +02:00
parent e8a735b004
commit 681d70e466

View File

@ -7112,8 +7112,10 @@ var gIdentityHandler = {
let elem = document.activeElement;
let position = elem.compareDocumentPosition(this._identityPopup);
if (!(position & Node.DOCUMENT_POSITION_CONTAINS)) {
// Hide the panel when some element outside the panel received focus.
if (!(position & (Node.DOCUMENT_POSITION_CONTAINS |
Node.DOCUMENT_POSITION_CONTAINED_BY))) {
// Hide the panel when focusing an element that is
// neither an ancestor nor descendant.
this._identityPopup.hidePopup();
}
},