mbnuqw / sidebery

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

"Next Tab" close behavior incorrect with discarded tree parent and "ignore discarded tabs" selected #179

Open jathek opened 4 years ago

jathek commented 4 years ago

Steps to reproduce

  1. Create Tabs A, B, C in panel.
  2. Create Tab BB as a child of B. Focus Tab BB.
  3. Discard Tab B.
  4. Close Tab BB.
  5. Focus goes to Tab A.

Expected behavior

Discarded parent Tab B should be ignored and the next tab focused should be Tab C.

Actual behavior

Discarded parent Tab B is properly ignored, but focus goes to Tab A, which is the previous tab, not the next tab.

Environment info

OS: win Firefox: 75.0 Addon: 4.6.2

{ "settings": { "version": "4.6.2", "nativeScrollbars": true, "ctxMenuNative": false, "autoHideCtxMenu": "none", "ctxMenuRenderInact": true, "navBarLayout": "horizontal", "navBarInline": false, "hideAddBtn": true, "hideSettingsBtn": false, "navBtnCount": true, "hideEmptyPanels": false, "navMidClickAction": "none", "navSwitchPanelsWheel": false, "groupLayout": "list", "dndTabAct": false, "dndTabActDelay": 750, "dndTabActMod": "none", "dndExp": "pointer", "dndExpDelay": 0, "dndExpMod": "none", "stateStorage": "global", "warnOnMultiTabClose": "any", "activateOnMouseUp": true, "activateLastTabOnPanelSwitching": false, "skipEmptyPanels": false, "showTabRmBtn": false, "showTabCtx": true, "hideInact": true, "activateAfterClosing": "next", "activateAfterClosingPrevRule": "tree", "activateAfterClosingNextRule": "tree", "activateAfterClosingGlobal": false, "activateAfterClosingNoFolded": true, "activateAfterClosingNoDiscarded": true, "shiftSelAct": true, "askNewBookmarkPlace": true, "tabsRmUndoNote": true, "nativeHighlight": true, "moveNewTabPin": "end", "moveNewTabParent": "last_child", "moveNewTabParentActPanel": false, "moveNewTab": "end", "pinnedTabsPosition": "panel", "pinnedTabsList": false, "tabsTree": true, "groupOnOpen": true, "tabsTreeLimit": "none", "hideFoldedTabs": true, "autoFoldTabs": true, "autoFoldTabsExcept": 2, "autoExpandTabs": true, "rmChildTabs": "folded", "tabsChildCount": true, "tabsLvlDots": true, "discardFolded": false, "discardFoldedDelay": 0, "discardFoldedDelayUnit": "sec", "tabsTreeBookmarks": true, "bookmarksPanel": true, "warnOnMultiBookmarkDelete": "collapsed", "openBookmarkNewTab": false, "midClickBookmark": "open_new_tab", "actMidClickTab": false, "autoCloseBookmarks": false, "autoRemoveOther": false, "highlightOpenBookmarks": true, "activateOpenBookmarkTab": false, "showBookmarkLen": true, "bookmarksRmUndoNote": true, "fontSize": "m", "bgNoise": true, "animations": true, "animationSpeed": "fast", "theme": "default", "style": "dark", "sidebarCSS": true, "groupCSS": false, "snapNotify": true, "snapExcludePrivate": false, "snapInterval": 180, "snapIntervalUnit": "min", "snapLimit": 14, "snapLimitUnit": "day", "hScrollThroughPanels": false, "scrollThroughTabs": "none", "scrollThroughVisibleTabs": false, "scrollThroughTabsSkipDiscarded": false, "scrollThroughTabsExceptOverflow": true, "scrollThroughTabsCyclic": false, "tabDoubleClick": "reload", "tabLongLeftClick": "none", "tabLongRightClick": "none", "tabsPanelLeftClickAction": "none", "tabsPanelDoubleClickAction": "tab", "tabsPanelRightClickAction": "menu", "syncName": "DeeperThought", "syncSaveSettings": true, "syncSaveCtxMenu": true, "syncSaveStyles": true, "syncAutoApply": false }, "permissions": { "allUrls": true, "tabHide": true, "actualAllUrls": true, "actualTabHide": true }, "storage": { "size": "10.4 mb", "props": { "bookmarksMenu": "226 b", "bookmarksPanelMenu": "54 b", "containers_v4": "524 b", "disabledKeybindings": "24 b", "expandedBookmarks": "50 b", "favAutoCleanTime": "10 b", "favUrls": "30 kb", "favicons": "477.2 kb", "lastSnapTime": "13 b", "panelIndex": "1 b", "panels_v4": "1.2 kb", "prevTabsData_v4": "75.4 kb", "profileID": "14 b", "settings": "2.4 kb", "sidebarCSS": "3.4 kb", "snapshots_v4": "9.8 mb", "tabsData_v4": "78.2 kb", "tabsMenu": "388 b", "tabsPanelMenu": "144 b" } }, "panels": [ { "type": "bookmarks", "id": "bookmarks", "cookieStoreId": "bookmarks", "name": 9, "icon": "...", "bookmarks": true, "lockedPanel": false }, { "type": "default", "id": "firefox-default", "name": 7, "icon": "...", "cookieStoreId": "firefox-default", "lockedTabs": false, "lockedPanel": false, "noEmpty": false, "newTabCtx": "none", "moveTabCtx": "none", "moveTabCtxNoChild": true }, { "type": "tabs", "id": "Qf9vV8t_uFI9", "name": 7, "icon": "...", "color": "...", "customIconSrc": "", "customIcon": "", "lockedTabs": false, "lockedPanel": false, "noEmpty": false, "newTabCtx": "none", "moveTabCtx": "none", "moveTabCtxNoChild": true, "urlRulesActive": false, "urlRules": "" }, { "type": "tabs", "id": "fiTbDpS9AQyX", "name": 9, "icon": "...", "color": "...", "customIconSrc": "", "customIcon": "", "lockedTabs": false, "lockedPanel": false, "noEmpty": false, "newTabCtx": "firefox-container-4", "moveTabCtx": "none", "moveTabCtxNoChild": true, "urlRulesActive": false, "urlRules": "" }, { "type": "tabs", "id": "vrjq0zPV5Rdv", "name": 6, "icon": "...", "color": "...", "customIconSrc": "", "customIcon": "", "lockedTabs": false, "lockedPanel": false, "noEmpty": false, "newTabCtx": "firefox-container-7", "moveTabCtx": "firefox-container-7", "moveTabCtxNoChild": true, "urlRulesActive": false, "urlRules": "" } ], "cssVars": "TypeError: can't convert undefined to object", "sidebarCSSLen": 3431, "windows": [ { "state": "maximized", "incognito": false, "tabsCount": 673 } ], "tabsMenu": [ [ "undoRmTab", "mute", "reload", "bookmark" ], "separator-1", [ { "name": "Move to" }, "moveToNewWin", "moveToNewPrivWin", "moveToAnotherWin", "moveToWin" ], "separator-2", [ { "name": "Tab Actions" }, "pin", "duplicate", "discard", "copyUrls" ], "separator-3", [ { "name": "" }, "moveToPanel" ], [ "moveToCtr" ], "separator-3795259787627495", [ { "name": "Tree Actions" }, "group", "flatten" ], "separator-4", [ "clearCookies", "close" ] ], "bookmarksMenu": [ [ { "name": "Open in" }, "openInNewWin", "openInNewPrivWin", "openInCtr" ], "separator-5", "createBookmark", "createFolder", "createSeparator", "separator-6", "sortByName", "sortByLink", "sortByTime", "separator-7", "copyUrls", "edit", "delete" ], "bookmarks": { "bookmarksCount": 4520, "foldersCount": 326, "separatorsCount": 0, "maxDepth": 8 } }
mbnuqw commented 4 years ago

Thank you for the report. Yes, this doesn't looks right.