Giter Site home page Giter Site logo

Comments (9)

piroor avatar piroor commented on May 27, 2024

Could you try shake your mouse cursor over other tabs before you release the button at outside of the sidebar area? Sometimes TST fails to detect your releasing of the button at outside of the sidebar, due to DOM event un-firing when you move your cursor across the sidebar immediately. Moving cursor across multiple DOM elements fires DOM event more certainly.

from treestyletab.

YousufSSyed avatar YousufSSyed commented on May 27, 2024

@piroor Here's a video
https://github.com/piroor/treestyletab/assets/42646062/52846fbb-39aa-4b08-828c-66f9f4b619ea

from treestyletab.

piroor avatar piroor commented on May 27, 2024

Thanks! Hmm, more debugging on macOS looks required...

from treestyletab.

YousufSSyed avatar YousufSSyed commented on May 27, 2024

@piroor Would you want me to do some debugging?

from treestyletab.

simcye avatar simcye commented on May 27, 2024

I get this occasionally, when it happens tabs go greyed out and I can't move them using either tree tab interface or the normal firefox interface, also when it happens at the bottom of the tree tab interface it starts scrolling this help text: "Dropping ot outside of sidebar will detach tabs from window [...]"

only way to fix it is restart firefox

from treestyletab.

piroor avatar piroor commented on May 27, 2024

After some investigation, I've realized that the problem is triggered due to delayed notification of changes to the local storage.
When you try to detach a tab from the window:

  1. dragenter event is dispatched, and internal config lastDragOverSidebarOwnerWindowId is updated with a specific window id.
  2. dragleave event is dispatched, and internal config lastDragOverSidebarOwnerWindowId is cleared.
  3. storage.local.onChanged listener is called with lastDragOverSidebarOwnerWindowId=id (it was triggered by dragenter) and internal value of lastDragOverSidebarOwnerWindowId is unexpectedly overwritten with a specific window id.
  4. dragend event is dispatched when you release the mouse button. lastDragOverSidebarOwnerWindowId has a window id, so TST treats the dragend event as "happens at inside the sidebar area", because lastDragOverSidebarOwnerWindowId should be cleared by dragleave. As the result TST does not detach the tab from the window.

I've introduced a change to avoid such a timing issue. A new development build is available at https://github.com/piroor/treestyletab/actions/runs/7193861829 so could you try it? @YousufSSyed

from treestyletab.

YousufSSyed avatar YousufSSyed commented on May 27, 2024

@piroor I installed Firefox Dev Edition and sideloaded it on the about:debugging page. It works very inconsistently, I thought it wasn't working at all until I did it like 5 times.

from treestyletab.

piroor avatar piroor commented on May 27, 2024

TST intentionally ignores tabs dropped near to the sidebar within (tab-height / 2) pixels for safety. For example, tabs dropped within 10 pixels from the sidebar area won't be detached if your tabs are shown with 20px height. Is your case described with this behavior?

Otherwise, some old workarounds may cause mis-detection of coordinates. Could you collect debug logs with a new development build? Steps are:

  1. Download XPI from https://github.com/piroor/treestyletab/actions/runs/7203396156 and install it.
  2. Go to TST's options page.
  3. Under the "Development" section, set as:
    • "Debug mode" => checked
    • "Log with timestamp" => checked
    • "sidebar/drag-and-drop" => checked
    • All other checkboxes under "Detailed logging" => unchecked
  4. Go to about:debugging
  5. "This Firefox" => "Temporary Extensions" or "Extensions" => "Tree Style Tab" => click the "Inspect" button.
  6. A remote debugger window is opened for TST. Ensure that "always on top" is activated.
  7. Click "Console" in the debugger window.
  8. Click the trash box button to clear contents.
  9. Try to detach an individual tab with drag and drop.
  10. You'll see logs like this: image
    All logs below the message "onDragStart: start" are from your drag session. This is an example when a tab is successfully detached - please note there is a message "trying to detach tab from window".
  11. Look at logs below the message "onDragEnd,". Some detailed parameters are collapsed with ellipses like "Object { a:0, b:1, ... }", for example "dragend at:" in the screenshot. It means some parameters are not disclosed, so click their triangle to expand them. You don't need to expand parameters recursively - only the top level needs to become visible, like as: image
  12. Copy logs below the message "onDragStart: start" and paste it here.

from treestyletab.

github-actions avatar github-actions commented on May 27, 2024

This issue has been closed due to no response within 14 days after labeled as "maybe fixed", 7 days after last reopened, and 7 days after last commented.

from treestyletab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.