mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 19:47:32 +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;
|
this._scrollOffset = win.pageYOffset;
|
||||||
|
|
||||||
|
doc.addEventListener("mousedown", this);
|
||||||
doc.addEventListener("click", this);
|
doc.addEventListener("click", this);
|
||||||
|
|
||||||
win.addEventListener("pagehide", this);
|
win.addEventListener("pagehide", this);
|
||||||
|
|
@ -191,13 +192,16 @@ AboutReader.prototype = {
|
||||||
if (!aEvent.isTrusted)
|
if (!aEvent.isTrusted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
let target = aEvent.target;
|
||||||
switch (aEvent.type) {
|
switch (aEvent.type) {
|
||||||
|
case "mousedown":
|
||||||
|
if (!target.closest(".dropdown-popup")) {
|
||||||
|
this._closeDropdowns();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "click":
|
case "click":
|
||||||
let target = aEvent.target;
|
|
||||||
if (target.classList.contains("dropdown-toggle")) {
|
if (target.classList.contains("dropdown-toggle")) {
|
||||||
this._toggleDropdownClicked(aEvent);
|
this._toggleDropdownClicked(aEvent);
|
||||||
} else if (!target.closest(".dropdown-popup")) {
|
|
||||||
this._closeDropdowns();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "scroll":
|
case "scroll":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue