sidebery icon indicating copy to clipboard operation
sidebery copied to clipboard

Drag and drop doesn't work

Open Addlai opened this issue 3 years ago • 7 comments

Steps to reproduce

Drag a tab from the Sideberry sidebar to a new position.

Expected behavior

Obviously, that the tab will move 100% of the time instead of only about 20%.

Actual behavior

On my computer, about 80% of the time nothing happens (the tab doesn't move). By contrast, dragging the Firefox tabs at the top of the Firefox window is completely reliable.

Environment info

OS:
Firefox version: 94.0.2 Addon version: 4.9.4

{ "settings": { "version": "4.9.4", "nativeScrollbars": true, "selWinScreenshots": false, "tabsCheck": true, "tabsFix": "notify", "markWindow": false, "markWindowPreface": "[Sidebery] ", "ctxMenuNative": false, "autoHideCtxMenu": "none", "ctxMenuRenderInact": true, "ctxMenuIgnoreContainers": "", "navBarLayout": "hidden", "navBarInline": false, "hideAddBtn": false, "hideSettingsBtn": false, "navBtnCount": true, "hideEmptyPanels": true, "navMidClickAction": "none", "navSwitchPanelsWheel": true, "groupLayout": "grid", "skipEmptyPanels": false, "dndTabAct": true, "dndTabActDelay": 750, "dndTabActMod": "none", "dndExp": "pointer", "dndExpDelay": 0, "dndExpMod": "none", "stateStorage": "global", "warnOnMultiTabClose": "collapsed", "activateOnMouseUp": true, "activateLastTabOnPanelSwitching": true, "showTabRmBtn": true, "showTabCtx": true, "hideInact": false, "activateAfterClosing": "next", "activateAfterClosingPrevRule": "visible", "activateAfterClosingNextRule": "tree", "activateAfterClosingGlobal": false, "activateAfterClosingNoFolded": true, "activateAfterClosingNoDiscarded": true, "shiftSelAct": true, "askNewBookmarkPlace": false, "tabsRmUndoNote": true, "nativeHighlight": false, "tabsUnreadMark": false, "tabsReloadLimit": 5, "tabsReloadLimitNotif": true, "moveNewTabPin": "start", "moveNewTabParent": "last_child", "moveNewTabParentActPanel": false, "moveNewTab": "end", "pinnedTabsPosition": "panel", "pinnedTabsList": false, "pinnedAutoGroup": false, "tabsTree": true, "groupOnOpen": true, "tabsTreeLimit": 1, "hideFoldedTabs": false, "autoFoldTabs": false, "autoFoldTabsExcept": "none", "autoExpandTabs": false, "rmChildTabs": "none", "tabsChildCount": true, "tabsLvlDots": false, "discardFolded": false, "discardFoldedDelay": 0, "discardFoldedDelayUnit": "sec", "tabsTreeBookmarks": true, "treeRmOutdent": "branch", "bookmarksPanel": true, "warnOnMultiBookmarkDelete": "collapsed", "openBookmarkNewTab": false, "midClickBookmark": "open_new_tab", "actMidClickTab": false, "autoCloseBookmarks": false, "autoRemoveOther": false, "highlightOpenBookmarks": false, "activateOpenBookmarkTab": false, "showBookmarkLen": false, "bookmarksRmUndoNote": true, "fontSize": "xxl", "bgNoise": false, "animations": false, "animationSpeed": "fast", "theme": "default", "style": "light", "sidebarCSS": true, "groupCSS": false, "snapNotify": true, "snapExcludePrivate": false, "snapInterval": 0, "snapIntervalUnit": "min", "snapLimit": 0, "snapLimitUnit": "snap", "hScrollThroughPanels": false, "scrollThroughTabs": "panel", "scrollThroughVisibleTabs": false, "scrollThroughTabsSkipDiscarded": false, "scrollThroughTabsExceptOverflow": true, "scrollThroughTabsCyclic": true, "tabDoubleClick": "none", "tabLongLeftClick": "none", "tabLongRightClick": "none", "tabsPanelLeftClickAction": "none", "tabsPanelDoubleClickAction": "tab", "tabsPanelRightClickAction": "menu", "tabsPanelMiddleClickAction": "tab", "syncName": "", "syncSaveSettings": false, "syncSaveCtxMenu": false, "syncSaveStyles": false, "syncAutoApply": false }, "permissions": { "allUrls": false, "tabHide": false, "actualAllUrls": false, "actualTabHide": false }, "storage": { "size": "2.1 mb", "props": { "containers_v4": "1.2 kb", "cssVars": "1.7 kb", "disabledKeybindings": "24 b", "expandedBookmarks": "2 b", "favAutoCleanTime": "10 b", "favUrls": "78.7 kb", "favicons": "1.8 mb", "groupCSS": "2 b", "panelIndex": "1 b", "panels_v4": "446 b", "prevTabsData_v4": "117.7 kb", "profileID": "14 b", "settings": "2.7 kb", "sidebarCSS": "8 b", "tabsData_v4": "117.7 kb" } }, "panels": [ { "type": "bookmarks", "id": "bookmarks", "cookieStoreId": "bookmarks", "name": 9, "icon": "...", "bookmarks": true, "lockedPanel": false, "skipOnSwitching": false }, { "type": "default", "id": "firefox-default", "name": 7, "icon": "...", "cookieStoreId": "firefox-default", "lockedTabs": false, "lockedPanel": false, "skipOnSwitching": false, "noEmpty": false, "newTabCtx": "none", "dropTabCtx": "none", "moveTabCtx": "none", "moveTabCtxNoChild": true } ], "containers": [ { "id": "firefox-container-1", "name": 8, "icon": "...", "color": "...", "proxified": false, "proxy": null, "includeHostsActive": false, "includeHosts": "", "excludeHostsActive": false, "excludeHosts": "", "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-2", "name": 4, "icon": "...", "color": "...", "proxified": false, "proxy": null, "includeHostsActive": false, "includeHosts": "", "excludeHostsActive": false, "excludeHosts": "", "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-3", "name": 7, "icon": "...", "color": "...", "proxified": false, "proxy": null, "includeHostsActive": false, "includeHosts": "", "excludeHostsActive": false, "excludeHosts": "", "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-4", "name": 8, "icon": "...", "color": "...", "proxified": false, "proxy": null, "includeHostsActive": false, "includeHosts": "", "excludeHostsActive": false, "excludeHosts": "", "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-6", "name": 11, "icon": "...", "color": "...", "proxified": false, "proxy": null, "includeHostsActive": false, "includeHosts": "", "excludeHostsActive": false, "excludeHosts": "", "userAgentActive": false, "userAgent": "" } ], "cssVars": { "bg": "#ffffff", "tabs_height": "34px", "tabs_indent": "30px", "tabs_bg_hover": "#ff9090", "tabs_bg_active": "#ffff00", "tabs_activated_bg": "#fef4c0", "tabs_selected_bg": "#458fff", "tabs_border": "none", "tabs_lvl_indicator_bg": "#eaff33ff", "bookmarks_folder_open_fg": "#eae6e3ff" }, "sidebarCSSLen": 3, "groupCSSLen": 0, "windows": [ { "state": "normal", "incognito": false, "tabsCount": 46 }, { "state": "normal", "incognito": false, "tabsCount": 68 }, { "state": "normal", "incognito": false, "tabsCount": 10 }, { "state": "normal", "incognito": false, "tabsCount": 54 }, { "state": "normal", "incognito": false, "tabsCount": 53 }, { "state": "normal", "incognito": false, "tabsCount": 60 }, { "state": "normal", "incognito": false, "tabsCount": 35 }, { "state": "normal", "incognito": false, "tabsCount": 18 }, { "state": "normal", "incognito": false, "tabsCount": 239 }, { "state": "normal", "incognito": false, "tabsCount": 12 }, { "state": "normal", "incognito": false, "tabsCount": 141 }, { "state": "normal", "incognito": false, "tabsCount": 47 }, { "state": "normal", "incognito": false, "tabsCount": 131 }, { "state": "normal", "incognito": false, "tabsCount": 27 }, { "state": "normal", "incognito": false, "tabsCount": 18 }, { "state": "normal", "incognito": false, "tabsCount": 20 }, { "state": "normal", "incognito": false, "tabsCount": 22 }, { "state": "normal", "incognito": false, "tabsCount": 24 } ], "bookmarks": { "bookmarksCount": 3487, "foldersCount": 245, "separatorsCount": 40, "maxDepth": 5 } }

Addlai avatar Dec 05 '21 19:12 Addlai

I was excited to receive the update to v4.10.0 yesterday, hoping that it would have solved this bug, based on its Release Notes including "Fixed: - Drag and drop" ... but sadly tab rearranging via D&D remains completely broken for me. I tested this in my real Nightly & FF-vanilla profiles, as well as in their respective virgin profiles. None was successful for D&D. Is there some special procedure i need to use whilst dragging?

Until it's fixed, this is my workaround: 1. In Settings i set these keybindings, which work well:
1.1 Move tab up = Ctrl+Up-arrow, Move tab down = Ctrl+Down-arrow. 1.2 Move tab right [ie, indent] = Ctrl+Right-arrow, Move tab left [ie, outdent] = Ctrl+Left-arrow.

However, i would very much prefer to rearrange tabs purely by mouse D&D.

guigirl42 avatar Dec 23 '21 08:12 guigirl42

@guigirl42, I cannot repro the issue on the latest Firefox Nightly build. It works as intended:

https://user-images.githubusercontent.com/6276694/147238210-f331792b-9ec3-42af-9196-ca7e4b028037.mp4

@Addlai, @guigirl42 Could you show the logs?

  • Open devtools (copy-paste this link: about:devtools-toolbox?id=%7B3c078156-979c-498b-8990-85f7987dd929%7D&type=extension)
  • navigate to "Console" tab,
  • click on the trash bin icon (at the top-left) to clear console,
  • then try to reproduce issue
  • and if any messages appear, copy and paste them here

mbnuqw avatar Dec 23 '21 12:12 mbnuqw

Hi, thanks for replying. I was excited to watch your little gif, but then once again disappointed when i retried it in my Nightly & still could not get it working. Then amongst all the many many failures, two separate times it worked... but i could not understand what i had done differently those times.

I next followed your procedure [still in my normal Nightly], but was a bit surprised to see NO error messages appeared in the Console, indeed no messages at all, despite me still experiencing constant D&D failures. So then i launched my Nightly clean/new test profile, installed Sidebery, left all its settings default [ie, very different to my real Nightly, in which i have changed many Sidebery settings], opened several random tabs, tried rearranging them via D&D [all failures], whilst watching the Console to again see NO error messages. Amongst all those failures, one D&D attempt did work... but same as for my real Nightly, i could not understand what i had done differently.

I rewatched your gif numerous times again, then suddenly i realised one thing different between how you did your D&D, vs how i have been doing mine ... you do it much much faster! So then i tried again in my clean Nightly, very fast... & it worked most of the time. I jumped back to my real Nightly, did it fast, & again it worked most of the time. I repeated but this time again at my preferred slower speed, & once more most of these failed. Next i fired up my vanilla standard Firefox, D&D fast... success. D&D slow ... fail.

Does this make any sense to you? Why should speed of the D&D action matter?

Tbh i wish it would work slower too, as i prefer dragging slow [compared to you] as otherwise i tend to be pretty inaccurate about where my tabs end up, ie, i then need to do several adjustments to achieve the exact sequence i had intended.

Still, this is progress! :-)

guigirl42 avatar Dec 23 '21 13:12 guigirl42

I've been struggling with this too. It seems that you must start dragging within about 300 ms (which happens to be the long left click timeout) after the click, otherwise when you drop the tab in the new position it will just pop back to where it started. If you're old and slow like I am, 300 ms is not a long time.

I have Long left click on tab set to none.

(I absolutely love Sidebery. I've been using browsers all day since 1993 and this is the best extension I've ever seen, by far. I'm always juggling ~100 tabs and this is the only way to make that work.)

permelin avatar Jan 06 '22 02:01 permelin

I could reproduce: clicking on a tab and waiting to long before starting to drag it over other tabs has the effect of, when let go, the tab not moving at all.

https://user-images.githubusercontent.com/38894056/156898198-8170a91c-c671-4a8d-9097-5ba48977b6c8.mp4

My guess is the click is registered as a long click instead of a drag, even if long left click is set to "none" in settings. And as it's set to none, when released, nothing happens.

anthmapper avatar Mar 05 '22 19:03 anthmapper

Just a quick albeit belated status-update: since i first posted, d&d has been working reliably for me ... i don't know if that's by AO bugfix, or simply because i learned how to do it correctly.

guigirl42 avatar Jul 12 '22 06:07 guigirl42

I'm having this on: Firefox 104.0.2 (new profile), Sideberry 4.10.2 (nothing else), Linux/Gnome/Debian(testing/sid).

If starting a drag with a long click, the drop always fails. The drop cursor moves correctly, tabs also load while hovering, releasing does nothing (same as pressing ESC, but without the cancel animation). Devtools console remains empty.

When starting the drag with a fast click-and-move, everything after that works as expected.

(On my main profile I have additional issues: Starting to drag an unloaded tab will always load it, and the dropped tab often, not always, moves to the bottom and then reloads again. But let's focus this original issue.)

martinxyz avatar Sep 16 '22 10:09 martinxyz

I'm seeing this happening on 107. The only way I can drag a tab is by moving towards the tab and clicking at the exact moment the mouse hovers over. It's more like pushing a tab than dragging. I haven't noticed this before. One thing that might be related is that I disabled and re-enabled the tree functionality and only noticed this a few days afterwards, of course a Firefox update happened within that time to confound things.

Iruberiam avatar Dec 02 '22 10:12 Iruberiam

This was fixed in v5 (development branch) about 10 days ago.

I could reproduce the issue where tabs are dropped to the bottom (from the animation in #45) both in current stable and beta (v5.0.0b29), but not in v5.

Glancing over the fix, it's plausible that it may have solved the first problem (where tabs didn't move), if that was still present (I could not reproduce it).

I decided to work on this yesterday, and somehow messed up checking the most recent commits. So I debugged it and found a slightly different fix, and an explanation. Not that it matters now, just in case it's interesting to someone: https://github.com/martinxyz/sidebery/commit/13d2ea640fc0145747d400cb11e19e35c0d45763

The problem had to do with losing track of the state (global "last position" variable) while dragging over the tiny whitespace between tabs:

reproduce-dragdrop-zone

If I understood the v5 bugfix correctly, it works by adding attributes to the outer <div> to make the whitespace identify as the tabs they belong to.

martinxyz avatar Dec 04 '22 21:12 martinxyz

I'm not a coder but I understand your description and explanation, thanks for looking in to this. It's actually been working OK today though so I don't know why my particular install stopped. I'm very grateful to you all for the extension and I'm looking forward to V5. Thank you.

Iruberiam avatar Dec 04 '22 22:12 Iruberiam

Is this fix only in v5 (not scheduled for v4)?

boldcompany avatar Sep 20 '23 15:09 boldcompany

@boldcompany, yes, only in v5.

mbnuqw avatar Sep 20 '23 15:09 mbnuqw

Fixed from v5.0.0

mbnuqw avatar Mar 05 '24 16:03 mbnuqw