From 49b0aa9f999fe81b131e7fce307c3b0e69e1e381 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Mon, 5 Sep 2016 01:14:32 +0900 Subject: [PATCH] Allow to drop non-tab data correctly (regression) --- content/treestyletab/res/tabsDragUtils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/res/tabsDragUtils.js b/content/treestyletab/res/tabsDragUtils.js index bbe6c7d5..decf1202 100644 --- a/content/treestyletab/res/tabsDragUtils.js +++ b/content/treestyletab/res/tabsDragUtils.js @@ -18,7 +18,7 @@ https://github.com/clear-code/js-extended-immutable */ (function() { - const currentRevision = 38; + const currentRevision = 39; if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {}; @@ -151,7 +151,10 @@ !aObserver.__tabsDragUtils__getDropEffectForTabDrag) { aObserver.__tabsDragUtils__getDropEffectForTabDrag = aObserver._getDropEffectForTabDrag; aObserver._getDropEffectForTabDrag = function(aEvent, ...aArgs) { - var fakeItemCount = window["piro.sakura.ne.jp"].tabsDragUtils.isTabsDragging(aEvent) ? 1 : null ; + if (!window["piro.sakura.ne.jp"].tabsDragUtils.isTabsDragging(aEvent)) + return aEvent; + + var fakeItemCount = 1; var fakeDataTransfer = new ExtendedImmutable(aEvent.dataTransfer, { get mozItemCount() { if (fakeItemCount) {