[Pkg-mozext-commits] [tabmixplus] 11/20: Update onTabBarScroll function to call stopPropagation and preventDefault before scrolling or change selected tab
David Prévot
taffit at moszumanska.debian.org
Thu Nov 16 18:58:53 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 f4c0b2f6be720686b28b08ccdf3417c0d022bcf5
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Oct 18 13:52:32 2017 +0300
Update onTabBarScroll function to call stopPropagation and preventDefault before scrolling or change selected tab
---
chrome/content/tabmix.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index f9ea9fe..e916a04 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -1067,12 +1067,12 @@ var TMP_eventListener = {
}
if (shouldMoveFocus) {
+ aEvent.stopPropagation();
+ aEvent.preventDefault();
if (aEvent.mozInputSource == MouseEvent.MOZ_SOURCE_MOUSE) {
direction = direction > 0 ? 1 : -1;
tabBar.advanceSelectedTab(direction, true);
}
- aEvent.stopPropagation();
- aEvent.preventDefault();
} else if (direction !== 0 && !Tabmix.extensions.treeStyleTab) {
// this code is based on scrollbox.xml wheel/DOMMouseScroll event handler
let scrollByDelta = function(delta) {
@@ -1113,6 +1113,9 @@ var TMP_eventListener = {
}
};
+ aEvent.stopPropagation();
+ aEvent.preventDefault();
+
if (orient == "vertical") {
if (!Tabmix.isVersion(480) && aEvent.axis == aEvent.HORIZONTAL_AXIS) {
return;
@@ -1127,8 +1130,6 @@ var TMP_eventListener = {
tabStrip._prevMouseScrolls.shift();
tabStrip._prevMouseScrolls.push(isVertical);
}
- aEvent.stopPropagation();
- aEvent.preventDefault();
}
},
--
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