summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorSonali9 <sonali18317@iiitd.ac.in>2019-04-27 09:18:44 -0400
committerAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-27 09:18:44 -0400
commitb430def773d2ee2fb027d1798aced0c7566c6ed4 (patch)
treec1fcf2c35714e1104fa0ca395f665922d4274b40 /toolkit
parent0612246b04c12c10929f809c3c5a56da0780f0c1 (diff)
downloaduxp-b430def773d2ee2fb027d1798aced0c7566c6ed4.tar.gz
Bug 1151735 - Hide font panel when text is being selected r=Gijs
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/reader/AboutReader.jsm10
1 files changed, 7 insertions, 3 deletions
diff --git a/toolkit/components/reader/AboutReader.jsm b/toolkit/components/reader/AboutReader.jsm
index 4cc9d67509..5defa623ed 100644
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -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":