[Pkg-mozext-commits] [tabmixplus] 36/147: Follow up bug 1316870 - Enable no-shadow eslint rule for browser, update compatibility with Multiple Tab Handler
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:27:34 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 3dabe565b4e65640b34ef7752dda25c5a2e5bd08
Author: onemen <tabmix.onemen at gmail.com>
Date: Tue Nov 29 16:50:26 2016 +0200
Follow up bug 1316870 - Enable no-shadow eslint rule for browser, update compatibility with Multiple Tab Handler
---
chrome/content/minit/minit.js | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 5d4f028..359890e 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -40,7 +40,7 @@ var TMP_tabDNDObserver = {
// is before (for dragging left) or after (for dragging right)
// the middle of a background tab, the dragged tab would take that
// tab's position when dropped.
- Tabmix.changeCode(tabBar, "gBrowser.tabContainer._animateTabMove")._replace(
+ let newCode = Tabmix.changeCode(tabBar, "gBrowser.tabContainer._animateTabMove")._replace(
'this.selectedItem = draggedTab;',
'if (Tabmix.prefs.getBoolPref("selectTabOnMouseDown"))\n\
$&\n\
@@ -56,8 +56,8 @@ var TMP_tabDNDObserver = {
'let tabCenter = tabScreenX + translateX + tabWidth / 2;',
'let tabCenter = tabScreenX + translateX + draggingRight * tabWidth;'
)._replace(
- tabsDragUtils ? /let screenX = boxObject\[TDUContext.*;/ :
- /let screenX = boxObject.*;/,
+ tabsDragUtils ? /screenX = boxObject\[TDUContext.*;/ :
+ /screenX = boxObject.*;/,
'$&\n ' +
'let halfWidth = boxObject.width / 2;\n ' +
'screenX += draggingRight * halfWidth;'
@@ -67,7 +67,12 @@ var TMP_tabDNDObserver = {
)._replace(
'newIndex >= oldIndex',
'rtl ? $& : draggingRight && newIndex > -1'
- ).toCode();
+ );
+ if (tabsDragUtils) {
+ setTimeout(() => newCode.toCode(), 0);
+ } else {
+ newCode.toCode();
+ }
Tabmix.changeCode(tabBar, "gBrowser.tabContainer._finishAnimateTabMove")._replace(
/(})(\)?)$/,
--
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