[Pkg-mozext-commits] [tabmixplus] 10/48: Window event listener for 'blur' blocked when current tab address starts with 'about:', Related to changesets e564d4042928, a1df6eab9f86
David Prévot
taffit at moszumanska.debian.org
Sun Aug 20 03:14:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 50927be41aa11b8724b236b268c11c7e1d9270df
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Jul 5 08:46:43 2017 +0300
Window event listener for 'blur' blocked when current tab address starts with 'about:', Related to changesets e564d4042928, a1df6eab9f86
---
chrome/content/flst/lasttab.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index a7c93e8..a365e66 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -63,6 +63,7 @@ var TMP_LastTab = {
if (!Tabmix.isVersion(470)) {
els.addSystemEventListener(window, "focus", this, true);
}
+ els.addSystemEventListener(window, "blur", this, true);
// if session manager select other tab then the first one we need to build
// TabHistory in two steps to maintain natural Ctrl-Tab order.
@@ -90,6 +91,7 @@ var TMP_LastTab = {
if (!Tabmix.isVersion(470)) {
els.removeSystemEventListener(window, "focus", this, true);
}
+ els.removeSystemEventListener(window, "blur", this, true);
},
handleEvent(event) {
@@ -100,7 +102,9 @@ var TMP_LastTab = {
}
break;
case "blur":
- this.updateDisallowDrag(false);
+ if (this.disallowDragState) {
+ this.updateDisallowDrag(false);
+ }
break;
case "keydown":
this.OnKeyDown(event);
@@ -139,8 +143,6 @@ var TMP_LastTab = {
disallowDragState: false,
updateDisallowDrag(disallow) {
- let el = disallow ? "addEventListener" : "removeEventListener";
- window[el]("blur", this);
this.disallowDragState = disallow;
Tabmix.setItem("TabsToolbar", "tabmix-disallow-drag", disallow || null);
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list