mbnuqw / sidebery

Firefox extension for managing tabs and bookmarks in sidebar.
MIT License
3.31k stars 167 forks source link

Dragging certain tabs onto themselves flattens portions of the entire tree #1415

Closed Narotiza closed 5 months ago

Narotiza commented 8 months ago

Steps to reproduce

Expected behavior

Either nothing happens, or something sensible and non-destructive happens

Actual behavior

The tab, and all precending tabs up to those the same level as the following tab, are flattened to the level of the following tab. firefox_3MKzXZt83j

Here's a particularly large and destructive example. Also shows how affected tabs keep their chevrons despite having no children firefox_ShYapLNaOZ

Debug info

Addon data these should be default settings (i imported just the settings from my main browser, but later reset them with the "Reset settings" button) ```json {"containers":{"firefox-container-1":{"id":"firefox-container-1","cookieStoreId":"firefox-container-1","name":"Personal","icon":"fingerprint","color":"blue","colorCode":"#37adff","proxified":false,"proxy":null,"reopenRulesActive":false,"reopenRules":[],"userAgentActive":false,"userAgent":""},"firefox-container-2":{"id":"firefox-container-2","cookieStoreId":"firefox-container-2","name":"Work","icon":"briefcase","color":"orange","colorCode":"#37adff","proxified":false,"proxy":null,"reopenRulesActive":false,"reopenRules":[],"userAgentActive":false,"userAgent":""},"firefox-container-3":{"id":"firefox-container-3","cookieStoreId":"firefox-container-3","name":"Banking","icon":"dollar","color":"green","colorCode":"#37adff","proxified":false,"proxy":null,"reopenRulesActive":false,"reopenRules":[],"userAgentActive":false,"userAgent":""},"firefox-container-4":{"id":"firefox-container-4","cookieStoreId":"firefox-container-4","name":"Shopping","icon":"cart","color":"pink","colorCode":"#37adff","proxified":false,"proxy":null,"reopenRulesActive":false,"reopenRules":[],"userAgentActive":false,"userAgent":""}},"settings":{"nativeScrollbars":true,"nativeScrollbarsThin":true,"nativeScrollbarsLeft":false,"selWinScreenshots":false,"updateSidebarTitle":true,"markWindow":false,"markWindowPreface":"[Sidebery] ","ctxMenuNative":false,"ctxMenuRenderInact":true,"ctxMenuRenderIcons":true,"ctxMenuIgnoreContainers":"","navBarLayout":"horizontal","navBarInline":true,"navBarSide":"left","hideAddBtn":false,"hideSettingsBtn":false,"navBtnCount":true,"hideEmptyPanels":true,"hideDiscardedTabPanels":false,"navActTabsPanelLeftClickAction":"none","navActBookmarksPanelLeftClickAction":"none","navTabsPanelMidClickAction":"discard","navBookmarksPanelMidClickAction":"none","navSwitchPanelsWheel":true,"subPanelRecentlyClosedBar":true,"subPanelBookmarks":true,"subPanelHistory":true,"groupLayout":"grid","containersSortByName":false,"skipEmptyPanels":false,"dndTabAct":true,"dndTabActDelay":750,"dndTabActMod":"none","dndExp":"pointer","dndExpDelay":750,"dndExpMod":"none","dndOutside":"win","dndActTabFromLink":true,"dndActSearchTab":true,"dndMoveTabs":false,"dndMoveBookmarks":false,"searchBarMode":"dynamic","searchPanelSwitch":"same_type","searchBookmarksShortcut":"","searchHistoryShortcut":"","warnOnMultiTabClose":"collapsed","activateLastTabOnPanelSwitching":true,"activateLastTabOnPanelSwitchingLoadedOnly":true,"switchPanelAfterSwitchingTab":"always","tabRmBtn":"hover","activateAfterClosing":"next","activateAfterClosingStayInPanel":false,"activateAfterClosingGlobal":false,"activateAfterClosingNoFolded":true,"activateAfterClosingNoDiscarded":true,"askNewBookmarkPlace":true,"tabsRmUndoNote":true,"tabsUnreadMark":false,"tabsUpdateMark":"all","tabsUpdateMarkFirst":true,"tabsReloadLimit":5,"tabsReloadLimitNotif":true,"showNewTabBtns":true,"newTabBarPosition":"after_tabs","tabsPanelSwitchActMove":false,"tabsPanelSwitchActMoveAuto":true,"tabsUrlInTooltip":"full","newTabCtxReopen":false,"tabWarmupOnHover":true,"tabSwitchDelay":0,"moveNewTabPin":"start","moveNewTabParent":"last_child","moveNewTabParentActPanel":false,"moveNewTab":"end","moveNewTabActivePin":"start","pinnedTabsPosition":"panel","pinnedTabsList":false,"pinnedAutoGroup":false,"pinnedNoUnload":false,"tabsTree":true,"groupOnOpen":true,"tabsTreeLimit":"none","autoFoldTabs":false,"autoFoldTabsExcept":"none","autoExpandTabs":false,"autoExpandTabsOnNew":false,"rmChildTabs":"folded","tabsLvlDots":true,"discardFolded":false,"discardFoldedDelay":0,"discardFoldedDelayUnit":"sec","tabsTreeBookmarks":true,"treeRmOutdent":"branch","ignoreFoldedParent":false,"colorizeTabs":false,"colorizeTabsSrc":"domain","colorizeTabsBranches":false,"colorizeTabsBranchesSrc":"url","inheritCustomColor":true,"hideInact":false,"hideFoldedTabs":false,"hideFoldedParent":"none","nativeHighlight":true,"warnOnMultiBookmarkDelete":"collapsed","autoCloseBookmarks":false,"autoRemoveOther":false,"highlightOpenBookmarks":false,"activateOpenBookmarkTab":false,"showBookmarkLen":true,"bookmarksRmUndoNote":true,"loadBookmarksOnDemand":true,"pinOpenedBookmarksFolder":true,"oldBookmarksAfterSave":"ask","loadHistoryOnDemand":true,"fontSize":"m","animations":true,"animationSpeed":"norm","theme":"proton","density":"default","colorScheme":"ff","sidebarCSS":false,"groupCSS":false,"snapNotify":true,"snapExcludePrivate":false,"snapInterval":0,"snapIntervalUnit":"min","snapLimit":0,"snapLimitUnit":"snap","snapAutoExport":false,"snapAutoExportType":"json","snapAutoExportPath":"Sidebery/snapshot-%Y.%M.%D-%h.%m.%s","snapMdFullTree":false,"hScrollAction":"none","navSwitchPanelsDelay":128,"scrollThroughTabs":"none","scrollThroughVisibleTabs":true,"scrollThroughTabsSkipDiscarded":true,"scrollThroughTabsExceptOverflow":true,"scrollThroughTabsCyclic":false,"scrollThroughTabsScrollArea":0,"autoMenuMultiSel":true,"multipleMiddleClose":false,"longClickDelay":500,"wheelThreshold":false,"wheelThresholdX":10,"wheelThresholdY":60,"tabDoubleClick":"none","tabsSecondClickActPrev":true,"tabsSecondClickActPrevPanelOnly":false,"shiftSelAct":true,"activateOnMouseUp":false,"tabLongLeftClick":"none","tabLongRightClick":"none","tabMiddleClick":"close","tabMiddleClickCtrl":"discard","tabMiddleClickShift":"duplicate","tabCloseMiddleClick":"close","tabsPanelLeftClickAction":"none","tabsPanelDoubleClickAction":"tab","tabsPanelRightClickAction":"menu","tabsPanelMiddleClickAction":"tab","newTabMiddleClickAction":"new_child","bookmarksLeftClickAction":"open_in_act","bookmarksLeftClickActivate":false,"bookmarksLeftClickPos":"default","bookmarksMidClickAction":"open_in_new","bookmarksMidClickActivate":false,"bookmarksMidClickRemove":false,"bookmarksMidClickPos":"default","historyLeftClickAction":"open_in_act","historyLeftClickActivate":false,"historyLeftClickPos":"default","historyMidClickAction":"open_in_new","historyMidClickActivate":false,"historyMidClickPos":"default","syncName":"","syncSaveSettings":false,"syncSaveCtxMenu":false,"syncSaveStyles":false,"syncSaveKeybindings":false,"selectActiveTabFirst":true},"sidebar":{"nav":["bookmarks","firefox-default","IPza4umYY-fB","wHsn17WyYrgB","vwP3OIzA8HgB","7mDllMT-gdgB","SQ4p10EdP3MQ","K086RUmHS9ob","sp-0","add_tp","search","settings"],"panels":{"bookmarks":{"type":1,"id":"bookmarks","name":"Bookmarks","iconSVG":"icon_bookmarks","iconIMGSrc":"","iconIMG":"","color":"toolbar","lockedPanel":false,"tempMode":false,"skipOnSwitching":true,"rootId":"root________","viewMode":"tree","autoConvert":false,"srcPanelConfig":null},"firefox-default":{"type":2,"id":"firefox-default","name":"Default","color":"toolbar","iconSVG":"icon_tabs","iconIMGSrc":"","iconIMG":"","lockedPanel":false,"skipOnSwitching":false,"noEmpty":false,"newTabCtx":"none","dropTabCtx":"none","moveRules":[],"moveExcludedTo":-1,"bookmarksFolderId":-1,"newTabBtns":[],"srcPanelConfig":null},"IPza4umYY-fB":{"type":2,"id":"IPza4umYY-fB","name":"Website","color":"purple","iconSVG":"icon_code","iconIMGSrc":"","iconIMG":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA/klEQVQ4T6VTQQ6CQAxso/HsBV7gI0w8iIrxET7CB3gQL77Hu6DwBH9h4A/WllCzLMuGBA50YdvpdNoijHzQF7+vaC33jwCLPj8nQFzRJQ3wKlYC9SzWBvIDfGgJEzgMBohLeiFCIpSVRVTSYopwFBApiQiSNMSNMukw0EBxMEvQb7uMP4CdvclQsAMnhYhfsyzEs82iw6BPefn/JVgxyM0UsgaoUTmL0NtV9MwC3LraZnaHA3PRyquBDWLq0xLRZOByUmcvA1UciEsx2mSyEKEBIdfhEusUkRXP+SZplcD95xmJ7LF2TmKj+IkD3jUIwZzPd9dOeJdpyKKOBvgBeeChEeY0l1QAAAAASUVORK5CYII=","lockedPanel":false,"skipOnSwitching":false,"noEmpty":false,"newTabCtx":"none","dropTabCtx":"none","moveRules":[],"moveExcludedTo":-1,"bookmarksFolderId":-1,"newTabBtns":[],"srcPanelConfig":null},"wHsn17WyYrgB":{"type":2,"id":"wHsn17WyYrgB","name":"Gamedev","color":"blue","iconSVG":"icon_gamepad","iconIMGSrc":"","iconIMG":"","lockedPanel":false,"skipOnSwitching":false,"noEmpty":false,"newTabCtx":"none","dropTabCtx":"none","moveRules":[],"moveExcludedTo":-1,"bookmarksFolderId":-1,"newTabBtns":[],"srcPanelConfig":null},"vwP3OIzA8HgB":{"type":2,"id":"vwP3OIzA8HgB","name":"Minecraft","color":"green","iconSVG":"fruit","iconIMGSrc":"","iconIMG":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAuElEQVR42mNgoAcoN+H9T5FmFzn2//S3/bKY8v9NwnL/DURZSHMBSCMIf5DU+B+iwgnGW4AG1fKKgDFBzSCN/2W04RikGUbDDMJrAFjjqvX//0+b+/9/XCaGYTgNgNu+YBlWzSB8V1wVtyFw24PjIAagaQYZDjMghJMPjwE4MEEDNkEDC5/moyKKuA0AgXmCUmCFyBqJ1gwzABZdIE0wDNNM0AAQACmAKTYVZwVjojUjG4KsGJ2PDADtY+t7krOobwAAAABJRU5ErkJggg==","lockedPanel":false,"skipOnSwitching":false,"noEmpty":false,"newTabCtx":"none","dropTabCtx":"none","moveRules":[],"moveExcludedTo":-1,"bookmarksFolderId":-1,"newTabBtns":[],"srcPanelConfig":null},"7mDllMT-gdgB":{"type":2,"id":"7mDllMT-gdgB","name":"Thrive/Vigeo","color":"turquoise","iconSVG":"icon_flask","iconIMGSrc":"","iconIMG":"","lockedPanel":false,"skipOnSwitching":false,"noEmpty":false,"newTabCtx":"none","dropTabCtx":"none","moveRules":[],"moveExcludedTo":-1,"bookmarksFolderId":-1,"newTabBtns":[],"srcPanelConfig":null},"SQ4p10EdP3MQ":{"type":2,"id":"SQ4p10EdP3MQ","name":"D&D","color":"purple","iconSVG":"icon_book","iconIMGSrc":"D&D::#ff8800","iconIMG":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABtklEQVQ4T8WSTShlYRjH/+9lqZSNLCzYsMHC0kcszEJK0mQkk5IU0ZTCnZlCdO8hs1CalJUlUuMjKfJR8rGajS2SYmPB0MwQjt9977mLc7kbFk6dnqfn4/f83+d9jd74GTesQgVUZTmuVk2vdmJMN6QW/APzVbs2HVYXtSnUXeq/Jk2//hrXUSu5Ca/pn+6VY77rlOIyGW0QPwaabQGOzjAZ3rBxE1RHFPCoU6Ys4//Av8HvAxAEcMi0NmL15pvOic3TVO0OKkvJ2tKtcuMBqTTNmh59sICA9gC0M7EZFVcxgFUzrFFyCz6Ad85NppRRUEFBD7Ekmsu9nFXg+U0R+xIgKnNImcg8jizYdGvlGSCkSnKZiQGOftGUjooZbETVb98REgIcrdFQyy6m9aBO7Bz/H45R5AOE9ZF42nMFjtbZepuSVMcyB7iZPQrv8EvjlviFAUfxt1CM5EaaR4CMMbXKu858/HofwNEqgM9RgKsSppxgG5DfxXnn7KMxWrRA6ZqFFdCwhF0EnkMsj7o8/0t0NU3wk934iJoo/AlgPLIDXugUt7LvvcQLbA2qtk3s3b/Wvj/gCZyp239Ub4wTAAAAAElFTkSuQmCC","lockedPanel":false,"skipOnSwitching":false,"noEmpty":false,"newTabCtx":"none","dropTabCtx":"none","moveRules":[],"moveExcludedTo":-1,"bookmarksFolderId":-1,"newTabBtns":[],"srcPanelConfig":null},"K086RUmHS9ob":{"type":2,"id":"K086RUmHS9ob","name":"Linux","color":"purple","iconSVG":"icon_code","iconIMGSrc":"","iconIMG":"","lockedPanel":false,"skipOnSwitching":false,"noEmpty":false,"newTabCtx":"none","dropTabCtx":"none","moveRules":[],"moveExcludedTo":-1,"bookmarksFolderId":-1,"newTabBtns":[],"srcPanelConfig":null}}},"contextMenu":{"tabs":[{"name":"","opts":["mute","reload","copyTabsUrls","bookmark","discard"]},"separator-1",{"name":"Move to","opts":["moveToNewWin","moveToWin","moveToPanel"]},{"name":"Reopen in","opts":["reopenInNewWin","reopenInWin","reopenInCtr"]},"separator-2","pin","duplicate","copyUrls","separator-3","group","flatten","separator-4","close"],"tabsPanel":[{"opts":["undoRmTab","muteAllAudibleTabs","reloadTabs","discardTabs"]},"separator-7","selectAllTabs","collapseInactiveBranches","closeTabsDuplicates","closeTabs","separator-8","bookmarkTabsPanel","restoreFromBookmarks","convertToBookmarksPanel","separator-9","openPanelConfig","hidePanel","removePanel"],"bookmarks":[{"name":"Open in","opts":["openInNewWin","openInNewPrivWin","openInCtr"]},"separator-5","createBookmark","createFolder","createSeparator","separator-6","sortByName","sortByLink","sortByTime","separator-7","copyUrls","edit","delete"],"bookmarksPanel":["collapseAllFolders","switchViewMode","convertToTabsPanel","separator-9","unloadPanelType","openPanelConfig","hidePanel","removePanel"]},"favHashes":[-960829278],"favDomains":{"addons.mozilla.org":{"index":0,"len":125}},"favicons":["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACGklEQVQ4T41TPWhTURT+zkuaOgi14NJAIRBifiaRNHmkgzSD0ELBSRCJKIgOtqvFqbRDqYuIToVSRKSig9pN6yYtNYm/gzR5aa0t2HYQl0g1vLx7Pff2NenPs/qWd+93vvPdc75zL0F9+fIApMggELiNU+G3GiuUuyDEc8CYRfrEFRA5kJLwpjTM0RAMjCEdtwhFTnbEPZ0E+RBmIofilxTE75eQdEzDRNNYjV5EaDkIYa9tc7EOf1uEFReneXPeJX4F4Q6EHOF9m0vc/pHxjA+wuIqhBi59CcL75STs+iAHuzkY3pPktSGSzHvKLXxGKj5MDU7eGoR07v6HwHdsbXSgp6euC9MJqmenNnug7L+q0WOsRS/gHDmEPLeA2quGYf8swSUQHiEVyykTvzEUdOElGFThHrOQaN1rIq2wT2XGs4wHdMwwrqu5TnHgMjdTQ/BoOzo7f+HdUha2/YIpLe4EXsNX7UUyuYV86QYfcIvxKoT/NPHG4Is0yYAJM5Zomlqa51jGneFZjs3odWGxH4IewN/Sj2R4rjkFJUQktOAnqwM1+ZHXx13BcZjxmw3xJ9KnDGxOYSdSqbTih73pbahKoFGY0dHd3jQr2EEL5Ql+A1c9hvET5D+DdGThcAH1YIrWFItc2kWs4kigDyfDc/uFD1agGMqHgnWfX2hOu+2jXnTF5r2uiLeAYiqjQtY11I0FZCIfvJIV9gc2Lr93U8C5nAAAAABJRU5ErkJggg=="],"ver":"5.0.0","keybindings":{"_execute_sidebar_action":"F1","next_panel":"Alt+Period","prev_panel":"Alt+Comma","new_tab_on_panel":"Ctrl+Space","new_tab_in_group":"Ctrl+Shift+Space","up":"Alt+Up","down":"Alt+Down","up_shift":"Alt+Shift+Up","down_shift":"Alt+Shift+Down","activate":"Alt+Space","reset_selection":"Alt+R"}} ```

Logs: No console output when reproducing issue

mbnuqw commented 5 months ago

Duplicate of #1293