Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting a different tab while moving the cursor (dragging) may move it to new window #2078

Closed
gonhidi opened this issue Nov 21, 2018 · 17 comments

Comments

@gonhidi
Copy link

gonhidi commented Nov 21, 2018

Short description

When selecting a different tab by clicking on it using the Tree Style Tab (TST) sidebar, if the cursor has any motion the newly-selected tab (and its siblings) might end up in a new window.

Reference tab structure:

A (current)
B

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Create the reference tab structure.
  4. (Optional) To improve the chance of triggering the behaviour by quite a bit, unload the unselected tab B (e.g. configure Firefox to save the session and restart it).
  5. Click on unselected tab B while moving the cursor within the tab (fast movement and clicking, a sort of blitz drag-and-drop, improves the chances of triggering the behaviour).

Expected result

Since the cursor movement has been within the tab, the newly selected tab B should remain within its position.

Actual result

The newly selected tab B has a chance to be dragged to an entirely new window (along with any tabs hanging from it).

Environment

  • Platform (OS): macOS 10.14.1
  • Version of Firefox: 63.0.3
  • Version (or revision) of Tree Style Tab: 2.6.8

Observations

Regarding TST, the behaviour seems to begin with version 2.5.3. Some aspects of clicking an unselected tab while moving the cursor might be a little different if done outside of the described steps (e.g. dragging the unselected, and perhaps unloaded, tab outside of its position), but that is not the focus of this report.

Regarding Firefox, some weirdness seems to begin with version 61 and TST 2.5.3 (or higher): in version 60, if the click-while-moving of an unloaded tab drags it to a new position in the tree, the tab seems to be properly moved there; with version 61 is tends to remain where it is, though it sometimes end in a new window (though I am tired of testing to feel too confident about it). Regardless of that, the problem as described in the non-optional ”steps to reproduce” seems more likely to happen starting with version 62 (and versions 63 and betas of 64). Note that with version 65 (e.g. nightly 65.0a1 (2018-11-20)) TST 2.5.2 tabs (and earlier) cannot be moved around, so the change of behaviour from 2.5.2 to 2.5.3 described in this issue can no longer be compared in them.

Regarding the rest of the environment, I believe that, the more heavily loaded Firefox is, the more likely the behaviour is to trigger: it is the constant misbehaviour in a long-lived profile with several windows and hundreds of tabs that has lead me to open this issue (in particular, the behaviour was triggered on a tree with many unloaded tabs, the new window they were dragged to bugged out and disappeared, and I found no trace under Firefox's “Recently Closed Windows”, which left me a little sore about not having described the situation earlier).

@piroor
Copy link
Owner

piroor commented Nov 22, 2018

Could you collect logs for the problem "a clicked tab is unexpectedly detached from the window", in the debug mode? Steps:

  • Check "Development" => "Debug mode"
  • Check only "sidebar/mouse-event-listener" and "sidebar/drag-and-drop" under "Detailed logging" (and uncheck all rest checkboxes for logging)
  • Go to "about:debugging", activate debugging of addons, and click "Debug" in TST's item.
  • A remote debugger window is opened, so switch to the "Console" tab.

@gonhidi
Copy link
Author

gonhidi commented Nov 22, 2018

The setting is Firefox with a single window and two loaded non-nested tabs. The first tab has been selected and a click-while-dragging action is performed on the second one, with both the button press and button release actions perfomed on its surface:

tst<Sidebar-3>: sidebar/mouse-event-listener:      onMouseDown: found target tab:  
<li id="tab-3-2" class="tab subtree-collapsed contextual-identity-firefox-default animation-ready complete" data-tab-id="2" data-window-id="3" draggable="true" data-persistent-id="tab-agile-tahr-1542890653760-126" data-current-uri="about:newtab" data-label="New Tab\n#tab-3-2\n(tab subtree-collapsed contextual-identity-firefox-default animation-ready complete)\nuniqueId = tab-agile-tahr-1542890653760-126\nduplicated = false / null / null\nrestored = false\ntabId = 2\nwindowId = 3" title="New Tab\n#tab-3-2\n(tab subtree-collapsed contextual-identity-firefox-default animation-ready complete)\nuniqueId = tab-agile-tahr-1542890653760-126\nduplicated = false / null / null\nrestored = false\ntabId = 2\nwindowId = 3" data-label-with-descendants="* New Tab\n#tab-3-2\n(tab subtree-collapsed collapsed opening contextual-identity-firefox-default highlighted animation-ready active loading throbber-unsynchronized)\nuniqueId = tab-agile-tahr-1542890653760-126\nduplicated = false / null / null\nrestored = false\ntabId = 2\nwindowId = 3">
common.js:313:5
tst<Sidebar-3>: sidebar/mouse-event-listener:      onMouseDown  
Object { targetType: "tab", tab: "tab-3-2", soundButton: false, closebox: false, button: 0, ctrlKey: false, shiftKey: false, altKey: false, metaKey: false, isMiddleClick: false, … }
common.js:313:5
tst<BG>: sidebar/mouse-event-listener:      Constants.kNOTIFY_TAB_MOUSEDOWN common.js:313:5
tst<BG>: sidebar/mouse-event-listener:     Sending message to listeners common.js:313:5
tst<BG>: sidebar/mouse-event-listener:     Ready to select the tab common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      onDragStart: start  
dragstart { target: li#tab-3-2.tab.subtree-collapsed.contextual-identity-firefox-default.animation-ready.complete.active
, buttons: 1, clientX: 55, clientY: 36, layerX: 18, layerY: 9 }
 
Object {  }
common.js:313:5
onDragStart: start  
dragstart { target: li#tab-3-2.tab.subtree-collapsed.contextual-identity-firefox-default.animation-ready.complete.active
, buttons: 1, clientX: 55, clientY: 36, layerX: 18, layerY: 9 }
 
Object {  }
drag-and-drop.js:673:3
tst<Sidebar-3>: sidebar/drag-and-drop:      onDragStart: started common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      onDragEnd, mDraggingOnSelfWindow =  true common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:       finishDrag common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      dragend at:  
Object { windowX: 264, windowY: 412, windowW: 216, windowH: 694, eventX: 0, eventY: 0, offset: 24.199996948242188 }
common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      trying to detach tab from window common.js:313:5
tst<Sidebar-3>: sidebar/mouse-event-listener:      onMouseUp:  
<li id="tab-3-2" class="tab subtree-collapsed contextual-identity-firefox-default animation-ready complete active highlighted" data-tab-id="2" data-window-id="3" draggable="true" data-persistent-id="tab-agile-tahr-1542890653760-126" data-current-uri="about:newtab" data-label="New Tab\n#tab-3-2\n(tab subtree-collapsed contextual-identity-firefox-default animation-ready complete active dragging highlighted)\nuniqueId = tab-agile-tahr-1542890653760-126\nduplicated = false / null / null\nrestored = false\ntabId = 2\nwindowId = 3" title="New Tab\n#tab-3-2\n(tab subtree-collapsed contextual-identity-firefox-default animation-ready complete active dragging highlighted)\nuniqueId = tab-agile-tahr-1542890653760-126\nduplicated = false / null / null\nrestored = false\ntabId = 2\nwindowId = 3" data-label-with-descendants="* New Tab\n#tab-3-2\n(tab subtree-collapsed collapsed opening contextual-identity-firefox-default highlighted animation-ready active loading throbber-unsynchronized)\nuniqueId = tab-agile-tahr-1542890653760-126\nduplicated = false / null / null\nrestored = false\ntabId = 2\nwindowId = 3">
 
Object { living: true }
common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:     finishDrag common.js:313:5
Error: Invalid tab ID: 3
ExtensionUtils.jsm

@piroor
Copy link
Owner

piroor commented Nov 22, 2018

Thanks! The log says that some odd things happened on your environment:

  • On dragend, TST failed to get the tab existing at the dropped position. If it was successfully detected, TST igored the "drag and drop" operation as I expected - but actually wasn't.
  • On dragend, TST couldn't get coordinates of the dropped position. The log sayed that the mouse button was released at: (x=0, y=0). It is crearly wrong.

Hmm...

@piroor
Copy link
Owner

piroor commented Nov 22, 2018

By recent commits I've changed the logic to detect the dragging action is finished on dragged tabs themselves or not. I hope this change solves the problem.

@gonhidi
Copy link
Author

gonhidi commented Nov 22, 2018

Going to about:config, setting extensions.webextensions.remote to false and restarting Firefox to apply the changes makes the issue much, much less likely to occur. (Also, unselected and unloaded tabs can be drag-selected to a different position, as I mentioned in the original report that Firerefox 60 did — not so 61 and above).

Given the difficulty of reproducing the issue with the change of settings, I have had trouble capturing a clean debug output. To my eyes, the starting, intermediate and ending positions of the mouse cursor in the test that resulted in the following output were quite clearly inside the tab and the sidebar:

tst<Sidebar-3>: sidebar/mouse-event-listener:      onMouseDown: found target tab:  
<li id="tab-3-2" class="tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default" data-tab-id="2" data-window-id="3" draggable="true" data-persistent-id="tab-natty-vervet-1542906574687-876" data-current-uri="about:newtab" data-label="New Tab\n#tab-3-2\n(tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / 83 / null\nrestored = true\ntabId = 2\nwindowId = 3" title="New Tab\n#tab-3-2\n(tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / 83 / null\nrestored = true\ntabId = 2\nwindowId = 3" data-label-with-descendants="* New Tab\n#tab-224-83\n(tab subtree-collapsed opening contextual-identity-firefox-default highlighted animation-ready active expanding complete bursting)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / null / null\nrestored = false\ntabId = 83\nwindowId = 224">
common.js:313:5
tst<Sidebar-3>: sidebar/mouse-event-listener:      onMouseDown  
Object { targetType: "tab", tab: "tab-3-2", soundButton: false, closebox: false, button: 0, ctrlKey: false, shiftKey: false, altKey: false, metaKey: false, isMiddleClick: false, … }
common.js:313:5
tst<BG>: sidebar/mouse-event-listener:      Constants.kNOTIFY_TAB_MOUSEDOWN common.js:313:5
tst<BG>: sidebar/mouse-event-listener:     Sending message to listeners common.js:313:5
tst<BG>: sidebar/mouse-event-listener:     Ready to select the tab common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      onDragStart: start  
dragstart { target: li#tab-3-2.tab.subtree-collapsed.animation-ready.complete.not-activated-since-load.discarded.contextual-identity-firefox-default
, buttons: 1, clientX: 97, clientY: 37, layerX: 60, layerY: 10 }
 
Object {  }
common.js:313:5
onDragStart: start  
dragstart { target: li#tab-3-2.tab.subtree-collapsed.animation-ready.complete.not-activated-since-load.discarded.contextual-identity-firefox-default
, buttons: 1, clientX: 97, clientY: 37, layerX: 60, layerY: 10 }
 
Object {  }
drag-and-drop.js:673:3
tst<Sidebar-3>: sidebar/drag-and-drop:      onDragStart: started common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      onDragOver: not droppable
common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      onDragEnd, mDraggingOnSelfWindow =  true common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:       finishDrag common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      dragend at:  
Object { windowX: 464, windowY: 280, windowW: 432, windowH: 694, eventX: 575, eventY: 192, offset: 24.199996948242188 }
common.js:313:5
tst<Sidebar-3>: sidebar/drag-and-drop:      trying to detach tab from window common.js:313:5
tst<Sidebar-3>: sidebar/mouse-event-listener:      onMouseUp:  
<li id="tab-3-2" class="tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default" data-tab-id="2" data-window-id="3" draggable="true" data-persistent-id="tab-natty-vervet-1542906574687-876" data-current-uri="about:newtab" data-label="New Tab\n#tab-3-2\n(tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / 83 / null\nrestored = true\ntabId = 2\nwindowId = 3" title="New Tab\n#tab-3-2\n(tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / 83 / null\nrestored = true\ntabId = 2\nwindowId = 3" data-label-with-descendants="* New Tab\n#tab-224-83\n(tab subtree-collapsed opening contextual-identity-firefox-default highlighted animation-ready active expanding complete bursting)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / null / null\nrestored = false\ntabId = 83\nwindowId = 224">
 
Object { living: true }
common.js:313:5
tst<Sidebar-3>: sidebar/mouse-event-listener:      onClick [object HTMLSpanElement] common.js:313:5
tst<Sidebar-3>: sidebar/mouse-event-listener:      clicked tab:  
<li id="tab-3-2" class="tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default" data-tab-id="2" data-window-id="3" draggable="true" data-persistent-id="tab-natty-vervet-1542906574687-876" data-current-uri="about:newtab" data-label="New Tab\n#tab-3-2\n(tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / 83 / null\nrestored = true\ntabId = 2\nwindowId = 3" title="New Tab\n#tab-3-2\n(tab subtree-collapsed animation-ready complete not-activated-since-load discarded contextual-identity-firefox-default)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / 83 / null\nrestored = true\ntabId = 2\nwindowId = 3" data-label-with-descendants="* New Tab\n#tab-224-83\n(tab subtree-collapsed opening contextual-identity-firefox-default highlighted animation-ready active expanding complete bursting)\nuniqueId = tab-natty-vervet-1542906574687-876\nduplicated = false / null / null\nrestored = false\ntabId = 83\nwindowId = 224">
common.js:313:5
OpenGL compositor Initialized Succesfully.
Version: 2.1 INTEL-12.2.17
Vendor: Intel Inc.
Renderer: Intel HD Graphics 4000 OpenGL Engine
FBO Texture Target: TEXTURE_2D
Error: Invalid tab ID: 17
ExtensionUtils.jsm

Despite that certainty of mine about the cursor placement, I am not sure that the output agrees. Note that I resized the sidebar to its maximum width, which looks to be around 862 physical pixels from the left edge of the window when examined on a screenshot and that the screen is a Retina one with the scaled horizontal and vertical resolutions set to half the physical ones.

@gonhidi
Copy link
Author

gonhidi commented Nov 22, 2018

I still experience the issue with TST 2.6.8.7790 (downloaded ten minutes ago) running on Firefox 65.0a1 (2018-11-22) (64-bit) and macOS 10.14.1. Mouse release coordinates continue to be reported as (0, 0).

@piroor
Copy link
Owner

piroor commented Nov 26, 2018

Sorry my previous changes were incomplete. The flag mDraggingOnDraggedTabs was cleared unexpectedly before it was referred. By recent changes it works as expected - now the problem "immediate drop on the dragged tab itself detaches the tab to a new window unexpectedly" looks solved.

On the other hand, another problem "clicking on a background tab triggers dragstart unexpectedly" is still there. It look unsolvable until any new API to warm up tabs https://bugzilla.mozilla.org/show_bug.cgi?id=1402256 become available.

@gonhidi
Copy link
Author

gonhidi commented Nov 26, 2018

Using a Firefox 65.0a1 nightly, the results of testing TST 2.6.8.7792 are:

  • macOS (10.14.1) seems to no longer experience the reported issue.
  • GNU/Linux (an x86-64 Ubuntu 18.04 VirtualBox guest on macOS) still has some drag starting weirdness when following the bug's reproduction steps; I imagine that this is the behaviour that likely requires the warm-up API to fix; since in my testing it doesn't lead to a drag stop onto a new window, I would say that this isn't the thread in which to follow its development.
  • Windows (7, x86-64) was unaffected so I haven't retested.

Thank you for your time and for the fix!

@gonhidi gonhidi closed this as completed Nov 26, 2018
@gonhidi
Copy link
Author

gonhidi commented Mar 16, 2019

The problem as described at the beginning of this thread is happening again with Tree Style Tab 2.8.5 on Firefox 65.0.2 on macOS 10.14.3, so I am reopening the issue. If it should warrant a different report (given the logs below or for some other reason) let me know or feel free to open one.

In this instance, the “sidebar/mouse-event-listener” and “sidebar/drag-and-drop” debug logs for a click-while-dragging are as follows:

tst<Sidebar-57>: sidebar/mouse-event-listener:      onMouseDown: found target tab:  
Object { id: 41, index: 5, windowId: 57, highlighted: false, active: false, attention: false, pinned: false, status: "complete", hidden: false, discarded: false, … }
common.js:331:5
tst<Sidebar-57>: sidebar/mouse-event-listener:      onMouseDown  
Object { targetType: "tab", tab: 41, twisty: false, soundButton: false, closebox: false, button: 0, ctrlKey: false, shiftKey: false, altKey: false, metaKey: false, … }
common.js:331:5
tst<BG>: sidebar/mouse-event-listener:      Constants.kNOTIFY_TAB_MOUSEDOWN common.js:331:5
tst<BG>: sidebar/mouse-event-listener:     Sending message to listeners common.js:331:5
tst<BG>: sidebar/mouse-event-listener:     Ready to handle click action on the tab common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragStart: start  
dragstart { target: li#tab-41.tab.complete.contextual-identity-firefox-default.animation-ready.active.highlighted, buttons: 1, clientX: 47, clientY: 128, layerX: 10, layerY: 5 }
 
Object {  }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragStart: started common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragOver: not droppable common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragOver: not droppable common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragOver: not droppable common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragOver: not droppable common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragOver: not droppable common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragOver: not droppable common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:       drop position = on  41 common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      onDragEnd,  
Object { mDraggingOnSelfWindow: true, mDraggingOnDraggedTabs: true }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      dragend at:  
Object { windowX: 1460, windowY: 532, windowW: 216, windowH: 694, eventScreenX: 806, eventScreenY: 393, eventClientX: 0, eventClientY: 0, offset: 24.199996948242188 }
common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:      trying to detach tab from window common.js:331:5
tst<Sidebar-57>: sidebar/drag-and-drop:     finishDrag common.js:331:5 

The specific actions were:

  1. While moving the cursor over an unselected tab, clicking it and not releasing the mouse button (i.e. dragging).
  2. Continuing to hold it for a couple of seconds over a greyed-out TST sidebar.
  3. Finally, releasing the button while continuing to hover the sidebar, which led to the creation of a new browser window for the tab instead of leaving it in the original window.

Thought the above log output is for TST 2.8.5, the behaviour is also reproducible with version 2.8.0, but not so with version 2.7.23.

@gonhidi gonhidi reopened this Mar 16, 2019
@gonhidi
Copy link
Author

gonhidi commented Mar 24, 2019

I have tried to reproduce the situation again today and I can't get to reproduce the renewed issue exactly as I described it nor with the same consistency. I will try further before making any other observations so as not to further muddy the waters.

@piroor
Copy link
Owner

piroor commented Mar 27, 2019

FYI: I've done the migration of the core architecture of TST planned at #2139. More testing with the latest development build is required.

@piroor
Copy link
Owner

piroor commented May 1, 2019

I close this because outdated.

@piroor piroor closed this as completed May 1, 2019
@gonhidi
Copy link
Author

gonhidi commented May 3, 2019

There are now two instances which feel slightly different (tested using and unbranded build of Firefox 66.0.3 and the 3.0.10.9081, 2019-05-03 01:58, development build of Tree Style Tab) in which a tab is unexpectedly detached.

The first case is when clicking down during uninterrupted mouse movement. When releasing the click, the tab gets moved to a new window:

tst<Sidebar-3>: 08:39:47.094 sidebar/mouse-event-listener:      onMouseDown: found target tab:  
Object { id: 33, index: 15, windowId: 3, highlighted: true, active: true, attention: false, pinned: false, status: "complete", hidden: false, discarded: false, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.095 sidebar/mouse-event-listener:      onMouseDown  
Object { targetType: "tab", tab: 33, twisty: false, soundButton: false, closebox: false, button: 0, ctrlKey: false, shiftKey: false, altKey: false, metaKey: false, … }
common.js:352:5
tst<BG>: 08:39:47.097 sidebar/mouse-event-listener:      Constants.kNOTIFY_TAB_MOUSEDOWN common.js:352:5
tst<BG>: 08:39:47.098 sidebar/mouse-event-listener:     Sending message to listeners common.js:352:5
tst<BG>: 08:39:47.099 sidebar/mouse-event-listener:     Ready to handle click action on the tab common.js:352:5
tst<BG>: 08:39:47.100 sidebar/mouse-event-listener:      =>  
Object { onRegularArea: true, wasMultiselectionAction: false }
common.js:352:5
tst<Sidebar-3>: 08:39:47.109 sidebar/drag-and-drop:      onDragStart: start  
dragstart { target: li#tab-33.tab.complete.contextual-identity-firefox-default.animation-ready.active.highlighted
, buttons: 1, clientX: 156, clientY: 329, layerX: 119, layerY: 12 }
 
Object {  }
common.js:352:5
tst<Sidebar-3>: 08:39:47.113 sidebar/drag-and-drop:      onDragStart: started common.js:352:5
tst<Sidebar-3>: 08:39:47.134 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.134 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.135 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.137 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.138 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.218 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.218 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.221 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.268 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.268 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.271 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.318 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.318 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.320 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.416 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.416 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.419 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.469 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.469 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.472 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.569 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.569 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.573 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.669 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.670 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.672 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.719 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.720 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.723 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.769 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.769 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.771 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.869 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.869 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.871 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:47.969 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:47.969 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:47.972 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:48.055 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:48.057 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:48.059 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:48.107 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:48.107 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:48.110 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:48.206 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:48.208 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:48.210 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:48.255 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:48.256 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:48.259 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:48.306 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:48.307 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:48.313 sidebar/drag-and-drop:      onDragOver: not droppable common.js:352:5
tst<Sidebar-3>: 08:39:48.317 sidebar/drag-and-drop:       drop position = on  33 common.js:352:5
tst<Sidebar-3>: 08:39:48.318 sidebar/drag-and-drop:        calculated info:  
Object { dragOverTab: {…}, targetTab: {…}, dropPosition: "self", action: 1024, parent: {…}, insertBefore: {…}, insertAfter: {…}, defineGetter: defineGetter(), draggedTabs: Getter, draggedTabIds: Getter, … }
common.js:352:5
tst<Sidebar-3>: 08:39:48.320 sidebar/drag-and-drop:      onDragEnd,  
Object { mDraggingOnSelfWindow: true, mDraggingOnDraggedTabs: true }
common.js:352:5
tst<Sidebar-3>: 08:39:48.320 sidebar/drag-and-drop:      dragend at:  
Object { windowX: 970, windowY: 284, windowW: 432, windowH: 694, eventScreenX: 787, eventScreenY: 468, eventClientX: 0, eventClientY: 0, offset: 24.199996948242188 }
common.js:352:5
tst<Sidebar-3>: 08:39:48.322 sidebar/drag-and-drop:      trying to detach tab from window common.js:352:5
tst<Sidebar-3>: 08:39:48.322 sidebar/drag-and-drop:     finishDrag common.js:352:5

The second case is when moving the mouse over a tab and stopping the mouse movement at the same time at which the mouse button is clicked down. In this case, the tab gets detached while the mouse button is still held down (as can be seen in the capture, where the mouse button release happens several seconds after the drag event is reportedly finished):

tst<Sidebar-3>: 08:42:58.154 sidebar/mouse-event-listener:      onMouseDown: found target tab:  
Object { id: 44, index: 15, windowId: 3, highlighted: true, active: true, attention: false, pinned: false, status: "complete", hidden: false, discarded: false, … }
common.js:352:5
tst<Sidebar-3>: 08:42:58.155 sidebar/mouse-event-listener:      onMouseDown  
Object { targetType: "tab", tab: 44, twisty: false, soundButton: false, closebox: false, button: 0, ctrlKey: false, shiftKey: false, altKey: false, metaKey: false, … }
common.js:352:5
tst<BG>: 08:42:58.157 sidebar/mouse-event-listener:      Constants.kNOTIFY_TAB_MOUSEDOWN common.js:352:5
tst<BG>: 08:42:58.159 sidebar/mouse-event-listener:     Sending message to listeners common.js:352:5
tst<BG>: 08:42:58.160 sidebar/mouse-event-listener:     Ready to handle click action on the tab common.js:352:5
tst<BG>: 08:42:58.161 sidebar/mouse-event-listener:      =>  
Object { onRegularArea: true, wasMultiselectionAction: false }
common.js:352:5
tst<Sidebar-3>: 08:42:58.163 sidebar/drag-and-drop:      onDragStart: start  
dragstart { target: li#tab-44.tab.complete.contextual-identity-firefox-default.throbber-unsynchronized.animation-ready.highlighted.active
, buttons: 1, clientX: 138, clientY: 325, layerX: 101, layerY: 8 }
 
Object {  }
common.js:352:5
tst<Sidebar-3>: 08:42:58.167 sidebar/drag-and-drop:      onDragStart: started common.js:352:5
tst<Sidebar-3>: 08:42:58.418 sidebar/drag-and-drop:     finishDrag common.js:352:5
tst<Sidebar-3>: 08:42:58.678 sidebar/drag-and-drop:      onDragEnd,  
Object { mDraggingOnSelfWindow: false, mDraggingOnDraggedTabs: false }
common.js:352:5
tst<Sidebar-3>: 08:42:58.679 sidebar/drag-and-drop:      dragend at:  
Object { windowX: 970, windowY: 284, windowW: 432, windowH: 694, eventScreenX: 0, eventScreenY: 0, eventClientX: 0, eventClientY: 0, offset: 24.199996948242188 }
common.js:352:5
tst<Sidebar-3>: 08:42:58.681 sidebar/drag-and-drop:      trying to detach tab from window common.js:352:5
tst<Sidebar-3>: 08:42:58.682 sidebar/drag-and-drop:     finishDrag common.js:352:5
tst<Sidebar-3>: 08:43:04.052 sidebar/mouse-event-listener:      onMouseUp:  
Object { id: 45, index: 15, windowId: 3, highlighted: true, active: true, attention: false, pinned: false, status: "complete", hidden: false, discarded: false, … }
 
Object { living: true }
common.js:352:5

@gonhidi
Copy link
Author

gonhidi commented Jan 1, 2020

The originally described behaviour still happens with unbranded Firefox 71.0.0 on macOS Mojave 10.14.6 using the development Tree Style Tab 3.2.6.9832 (tested on unloaded tabs):

tst<Sidebar-3>: 14:45:25.772 sidebar/mouse-event-listener:      onMouseDown: found target tab:  
Object { id: 21, index: 20, windowId: 3, highlighted: false, active: false, attention: false, pinned: false, status: "complete", hidden: false, discarded: true, … }
common.js:382:13
tst<Sidebar-3>: 14:45:25.774 sidebar/mouse-event-listener:      onMouseDown  
Object { targetType: "tab", tab: 21, tabId: 21, window: 3, windowId: 3, twisty: false, soundButton: false, closebox: false, button: 0, ctrlKey: false, … }
common.js:382:13
tst<Sidebar-3>: 14:45:25.776 sidebar/mouse-event-listener:       Sending message to listeners common.js:382:13
tst<Sidebar-3>: 14:45:25.818 sidebar/drag-and-drop:      onDragStart: start  
dragstart { target: tab-item#tab-21.animation-ready.complete.contextual-identity-firefox-default.tab.discarded
, buttons: 1, clientX: 178, clientY: 351, layerX: 141, layerY: 10 }
 
Object {  }
common.js:382:13
tst<Sidebar-3>: 14:45:25.827 sidebar/drag-and-drop:      onDragStart: started common.js:382:13
tst<Sidebar-3>: 14:45:25.891 sidebar/mouse-event-listener:      onMouseUp:  
Object { id: 21, index: 20, windowId: 3, highlighted: false, active: false, attention: false, pinned: false, status: "complete", hidden: false, discarded: true, … }
 
Object { living: true }
common.js:382:13
tst<Sidebar-3>: 14:45:25.899 sidebar/drag-and-drop:      onDragEnd,  
Object { mDraggingOnSelfWindow: true, mDraggingOnDraggedTabs: true, dropEffect: "none" }
common.js:382:13
tst<Sidebar-3>: 14:45:25.900 sidebar/drag-and-drop:     finishDrag common.js:382:13
tst<Sidebar-3>: 14:45:26.076 sidebar/drag-and-drop:     finishDrag common.js:382:13
tst<Sidebar-3>: 14:45:26.153 sidebar/drag-and-drop:     workaround for bug 1548949: detect dragged tabs are handled by me or not. 
Object { handledBySomeone: false, draggedTabs: "1577886212651-63956/21", lastDroppedTabs: "" }
common.js:382:13
tst<Sidebar-3>: 14:45:26.156 sidebar/drag-and-drop:     dragend at:  
{…}
​
devicePixelRatio: 2
​
eventClientX: 0
​
eventClientY: 0
​
eventScreenX: 0
​
eventScreenY: 0
​
fixedEventScreenX: 0
​
fixedEventScreenY: 0
​
offset: 12.099998474121094
​
windowH: 694
​
windowW: 432
​
windowX: 4
​
windowY: 140
​
<prototype>: Object { … }
common.js:382:13
tst<Sidebar-3>: 14:45:26.157 sidebar/drag-and-drop:     trying to detach tab from window common.js:382:13
Unhandled Error:  Error: "Invalid tab ID: 28" createErrorHandler@moz-extension://de42b06d-f2fd-b346-8e04-811e2b21e723/common/api-tabs.js:85:34
request@moz-extension://de42b06d-f2fd-b346-8e04-811e2b21e723/common/unique-id.js:102:100
updateUniqueId@moz-extension://de42b06d-f2fd-b346-8e04-811e2b21e723/common/Tab.js:208:21
checkRecycledTab@moz-extension://de42b06d-f2fd-b346-8e04-811e2b21e723/background/api-tabs-listener.js:634:14
onNewTabTracked@moz-extension://de42b06d-f2fd-b346-8e04-811e2b21e723/background/api-tabs-listener.js:559:23
api-tabs.js:109:17
Unhandled Error:  Error: "Invalid tab ID: 28" createErrorSuppressor@moz-extension://de42b06d-f2fd-b346-8e04-811e2b21e723/common/api-tabs.js:117:34
request@moz-extension://de42b06d-f2fd-b346-8e04-811e2b21e723/common/unique-id.js:144:109
api-tabs.js:145:17

@Graemek1
Copy link

Is this really closed? I'm seeing this exact problem. I hoped there would be a fix being worked on.

@gonhidi
Copy link
Author

gonhidi commented Mar 17, 2020

Is this really closed? I'm seeing this exact problem. I hoped there would be a fix being worked on.

Check issue #2444 and consider increasing the value of the maximumDelayForBug1561879 option (under “All Configs” of the “Development” section of the extension's preferences): A workaround involving a delay to drag and drop operations on coordinate (0, 0) was introduced with commit 4b591bc. Since it was too short for me and the optimum value was not clear the default was not changed, but it was made user-adjustable. I personally tend to it set to 1000 milliseconds (perhaps excessive: 500 or even lower also does the trick for me) since the only side effect I observe is not being able to drag and drop tabs in that time frame to one corner of the screen, which is a non-issue for me.

@Graemek1
Copy link

Graemek1 commented Mar 17, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants