mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Bug 1151735 - Hide font panel when text is being selected r=Gijs
This commit is contained in:
parent
deed413b53
commit
03e0f27552
1 changed files with 7 additions and 3 deletions
|
|
@ -58,6 +58,7 @@ var AboutReader = function(win, articlePromise) {
|
|||
|
||||
this._scrollOffset = win.pageYOffset;
|
||||
|
||||
doc.addEventListener("mousedown", this);
|
||||
doc.addEventListener("click", this);
|
||||
|
||||
win.addEventListener("pagehide", this);
|
||||
|
|
@ -191,13 +192,16 @@ AboutReader.prototype = {
|
|||
if (!aEvent.isTrusted)
|
||||
return;
|
||||
|
||||
let target = aEvent.target;
|
||||
switch (aEvent.type) {
|
||||
case "mousedown":
|
||||
if (!target.closest(".dropdown-popup")) {
|
||||
this._closeDropdowns();
|
||||
}
|
||||
break;
|
||||
case "click":
|
||||
let target = aEvent.target;
|
||||
if (target.classList.contains("dropdown-toggle")) {
|
||||
this._toggleDropdownClicked(aEvent);
|
||||
} else if (!target.closest(".dropdown-popup")) {
|
||||
this._closeDropdowns();
|
||||
}
|
||||
break;
|
||||
case "scroll":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue