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

[v5.x.x]After closing the last tab, a new blank tab is not created automatically #1230

Closed
dream-hack opened this issue Sep 15, 2023 · 12 comments

Comments

@dream-hack
Copy link

Steps to reproduce

Expected behavior

automatic create a new blank tab after closing the last tab

Actual behavior

After closing the last tab, a new blank tab is not created automatically, need to click the extension icon 2 times to display the blank tab.

v5.x :After closing the last tab, a new blank tab is not created automatically
v5

v4.x:After closing the last tab, a new blank tab is created automatically
v4

Debug info

Addon data
{
  "addonVersion": "5.0.0rc5",
  "firefoxVersion": "117.0.1",
  "settings": {
    "nativeScrollbars": false,
    "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": false,
    "hideDiscardedTabPanels": false,
    "navActTabsPanelLeftClickAction": "none",
    "navActBookmarksPanelLeftClickAction": "scroll",
    "navTabsPanelMidClickAction": "discard",
    "navBookmarksPanelMidClickAction": "none",
    "navSwitchPanelsWheel": true,
    "subPanelRecentlyClosedBar": false,
    "subPanelBookmarks": false,
    "subPanelHistory": false,
    "groupLayout": "grid",
    "skipEmptyPanels": false,
    "dndTabAct": false,
    "dndTabActDelay": 1000,
    "dndTabActMod": "none",
    "dndExp": "pointer",
    "dndExpDelay": 1000,
    "dndExpMod": "none",
    "dndOutside": "data",
    "dndActTabFromLink": true,
    "dndActSearchTab": true,
    "dndMoveTabs": false,
    "dndMoveBookmarks": false,
    "searchBarMode": "dynamic",
    "searchPanelSwitch": "same_type",
    "searchBookmarksShortcut": "",
    "searchHistoryShortcut": "",
    "warnOnMultiTabClose": "any",
    "activateLastTabOnPanelSwitching": true,
    "activateLastTabOnPanelSwitchingLoadedOnly": true,
    "switchPanelAfterSwitchingTab": "always",
    "tabRmBtn": "hover",
    "activateAfterClosing": "next",
    "activateAfterClosingStayInPanel": false,
    "activateAfterClosingGlobal": false,
    "activateAfterClosingNoFolded": true,
    "activateAfterClosingNoDiscarded": false,
    "askNewBookmarkPlace": false,
    "tabsRmUndoNote": true,
    "tabsUnreadMark": true,
    "tabsUpdateMark": "all",
    "tabsUpdateMarkFirst": true,
    "tabsReloadLimit": 5,
    "tabsReloadLimitNotif": true,
    "showNewTabBtns": false,
    "newTabBarPosition": "after_tabs",
    "tabsPanelSwitchActMove": true,
    "tabsPanelSwitchActMoveAuto": true,
    "tabsUrlInTooltip": "full",
    "newTabCtxReopen": false,
    "tabWarmupOnHover": true,
    "tabSwitchDelay": 0,
    "moveNewTabPin": "start",
    "moveNewTabParent": "default",
    "moveNewTabParentActPanel": false,
    "moveNewTab": "end",
    "moveNewTabActivePin": "start",
    "pinnedTabsPosition": "panel",
    "pinnedTabsList": true,
    "pinnedAutoGroup": false,
    "pinnedNoUnload": false,
    "tabsTree": true,
    "groupOnOpen": false,
    "tabsTreeLimit": "none",
    "autoFoldTabs": false,
    "autoFoldTabsExcept": "none",
    "autoExpandTabs": false,
    "autoExpandTabsOnNew": false,
    "rmChildTabs": "none",
    "tabsLvlDots": false,
    "discardFolded": false,
    "discardFoldedDelay": 0,
    "discardFoldedDelayUnit": "sec",
    "tabsTreeBookmarks": true,
    "treeRmOutdent": "branch",
    "ignoreFoldedParent": false,
    "colorizeTabs": false,
    "colorizeTabsSrc": "domain",
    "colorizeTabsBranches": true,
    "colorizeTabsBranchesSrc": "domain",
    "inheritCustomColor": true,
    "hideInact": false,
    "hideFoldedTabs": false,
    "hideFoldedParent": "none",
    "nativeHighlight": false,
    "warnOnMultiBookmarkDelete": "any",
    "autoCloseBookmarks": true,
    "autoRemoveOther": false,
    "highlightOpenBookmarks": true,
    "activateOpenBookmarkTab": false,
    "showBookmarkLen": true,
    "bookmarksRmUndoNote": true,
    "loadBookmarksOnDemand": true,
    "pinOpenedBookmarksFolder": false,
    "oldBookmarksAfterSave": "ask",
    "loadHistoryOnDemand": true,
    "fontSize": "xxs",
    "animations": true,
    "animationSpeed": "norm",
    "theme": "proton",
    "density": "compact",
    "colorScheme": "ff",
    "sidebarCSS": true,
    "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": "switch_act_tabs",
    "navSwitchPanelsDelay": 128,
    "scrollThroughTabs": "none",
    "scrollThroughVisibleTabs": true,
    "scrollThroughTabsSkipDiscarded": false,
    "scrollThroughTabsExceptOverflow": true,
    "scrollThroughTabsCyclic": true,
    "scrollThroughTabsScrollArea": 0,
    "autoMenuMultiSel": true,
    "multipleMiddleClose": false,
    "longClickDelay": 500,
    "wheelThreshold": false,
    "wheelThresholdX": 10,
    "wheelThresholdY": 60,
    "tabDoubleClick": "reload",
    "tabsSecondClickActPrev": false,
    "tabsSecondClickActPrevPanelOnly": false,
    "shiftSelAct": true,
    "activateOnMouseUp": false,
    "tabLongLeftClick": "none",
    "tabLongRightClick": "none",
    "tabMiddleClick": "close",
    "tabMiddleClickCtrl": "discard",
    "tabMiddleClickShift": "duplicate",
    "tabCloseMiddleClick": "discard",
    "tabsPanelLeftClickAction": "none",
    "tabsPanelDoubleClickAction": "undo",
    "tabsPanelRightClickAction": "menu",
    "tabsPanelMiddleClickAction": "tab",
    "newTabMiddleClickAction": "new_child",
    "bookmarksLeftClickAction": "open_in_act",
    "bookmarksLeftClickActivate": false,
    "bookmarksLeftClickPos": "default",
    "bookmarksMidClickAction": "open_in_new",
    "bookmarksMidClickActivate": true,
    "bookmarksMidClickRemove": false,
    "bookmarksMidClickPos": "default",
    "historyLeftClickAction": "open_in_act",
    "historyLeftClickActivate": false,
    "historyLeftClickPos": "default",
    "historyMidClickAction": "open_in_new",
    "historyMidClickActivate": false,
    "historyMidClickPos": "default",
    "syncName": "firefox@e430c",
    "syncSaveSettings": true,
    "syncSaveCtxMenu": true,
    "syncSaveStyles": true,
    "syncSaveKeybindings": true,
    "selectActiveTabFirst": true
  },
  "permissions": {
    "allUrls": false,
    "webRequest": false,
    "webRequestBlocking": false,
    "proxy": false,
    "tabHide": false,
    "clipboardWrite": false,
    "history": false,
    "bookmarks": true,
    "downloads": false
  },
  "storage": {
    "size": "639 kb",
    "props": {
      "containers": "1.07 kb",
      "contextMenu": "1.33 kb",
      "favDomains": "42.5 kb",
      "favHashes": "7.95 kb",
      "favicons_01": "578 kb",
      "profileID": "14 b",
      "settings": "4.8 kb",
      "sidebar": "914 b",
      "sidebarCSS": "588 b",
      "tabsDataCache": "831 b",
      "ver": "10 b"
    }
  },
  "sidebar": {
    "nav": [
      "ynSEqlEezLwj",
      "Tsj4UyQPbJwj",
      "history",
      "search",
      "add_tp",
      "settings"
    ],
    "panels": {
      "history": {
        "type": 4,
        "id": "history",
        "name": "len: 7",
        "color": "toolbar",
        "iconSVG": "icon_clock",
        "tempMode": true,
        "lockedPanel": true,
        "skipOnSwitching": false,
        "viewMode": "history"
      },
      "ynSEqlEezLwj": {
        "type": 2,
        "id": "ynSEqlEezLwj",
        "name": "len: 4",
        "color": "toolbar",
        "iconSVG": "icon_tabs",
        "iconIMGSrc": "",
        "iconIMG": "",
        "lockedPanel": false,
        "skipOnSwitching": false,
        "noEmpty": false,
        "newTabCtx": "none",
        "dropTabCtx": "none",
        "moveTabCtx": "none",
        "moveTabCtxNoChild": true,
        "bookmarksFolderId": -1,
        "newTabBtns": [],
        "moveRules": [],
        "moveExcludedTo": -1,
        "srcPanelConfig": null
      },
      "Tsj4UyQPbJwj": {
        "type": 1,
        "id": "Tsj4UyQPbJwj",
        "name": "len: 9",
        "iconSVG": "icon_bookmarks",
        "iconIMGSrc": "",
        "iconIMG": "",
        "color": "toolbar",
        "lockedPanel": true,
        "tempMode": true,
        "skipOnSwitching": false,
        "rootId": "toolbar_____",
        "viewMode": "tree",
        "autoConvert": false,
        "srcPanelConfig": null
      }
    }
  },
  "containers": [
    {
      "id": "firefox-container-1",
      "cookieStoreId": "firefox-container-1",
      "name": "8",
      "icon": "...",
      "color": "blue",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    },
    {
      "id": "firefox-container-2",
      "cookieStoreId": "firefox-container-2",
      "name": "4",
      "icon": "...",
      "color": "orange",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    },
    {
      "id": "firefox-container-3",
      "cookieStoreId": "firefox-container-3",
      "name": "7",
      "icon": "...",
      "color": "green",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    },
    {
      "id": "firefox-container-4",
      "cookieStoreId": "firefox-container-4",
      "name": "8",
      "icon": "...",
      "color": "pink",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    }
  ],
  "sidebarCSSLen": "570",
  "windows": [
    {
      "state": "maximized",
      "incognito": false,
      "tabsCount": 4
    }
  ],
  "bookmarks": {
    "bookmarksCount": 210,
    "foldersCount": 16,
    "separatorsCount": 0,
    "maxDepth": 3
  }
}
Logs
[sidebar] Init start chunk-32W5D3LQ.js:2:7807
[bg] Init start chunk-32W5D3LQ.js:2:7807
[sidebar:1] Sidebar.loadPanels chunk-32W5D3LQ.js:2:7807
[sidebar:1] Sidebar.loadPanels: Done: 25ms chunk-32W5D3LQ.js:2:7807
[sidebar:1] Tabs.load chunk-32W5D3LQ.js:2:7807
[sidebar:1] Tabs.restoreTabsState chunk-32W5D3LQ.js:2:7807
[bg] Windows.isWindowTabsLocked 1 chunk-32W5D3LQ.js:2:7807
[bg] IPC.onConnected sidebar 1 chunk-32W5D3LQ.js:2:7807
[bg] Init end: 406ms chunk-32W5D3LQ.js:2:7807
[sidebar:1] Tabs.findCachedData: mismatched: 1 1 1 chunk-32W5D3LQ.js:2:7893
[sidebar:1] Tabs.restoreTabsFromSessionData chunk-32W5D3LQ.js:2:7807
[sidebar:1] Tabs loading: Cannot find panels: -1 chunk-32W5D3LQ.js:2:7893
[sidebar:1] Tabs.restoreTabsState: Done: 126ms chunk-32W5D3LQ.js:2:7807
[sidebar:1] Tabs.load: Done: 145ms chunk-32W5D3LQ.js:2:7807
[sidebar:1] Init end: 590ms chunk-32W5D3LQ.js:2:7807

@mbnuqw
Copy link
Owner

mbnuqw commented Sep 17, 2023

Open sidebery settings >> Navigation bar >> Panel config and enable "Create new tab after the last one is closed"

@mbnuqw
Copy link
Owner

mbnuqw commented Sep 17, 2023

Oh, got it. You're using the browser.tabs.closeWindowWithLastTab: false, which indeed causing this behavior.

@martinlbrook
Copy link

I also have this bug - enabling "Create new tab after the last one is closed" does indeed work but only when the tab is closed by clicking the close button in the sidebar. If a tab is closed with Ctrl/Cmd W, the issue still happens.

@viktor-yunenko
Copy link

viktor-yunenko commented Nov 6, 2023

One workaround is to intercept the Firefox's native Close Tab shortcut and trigger Sidebery's native Close selected or active tab shortcut, for example on MacOS:

  • Turn on in Sidebery Settings: Configure panel -> Create a new tab after the last one is closed
    Screenshot

    image

  • In Sidebery Keybinding set a keyboard shortcut to something rare on Close selected or active tab / Delete selected bookmarks
    • in my case I used Ctrl + Cmd + 0 (Sidebery displays Cmd as Ctrl on macos for some reason)
    Screenshot

    image

  • In a tool like BetterTouchTool or Keyboard Maestro for Firefox create a trigger that intercepts the native Cmd + W shortcut and instead triggers your Sidebery shortcut for Close selected or active tab / Delete selected bookmarks
    • in my case, again, Ctrl + Cmd + 0
    Screenshot of BTT

    image

Thank you @martinlbrook for figuring out the problem trigger!

@alurm
Copy link

alurm commented Jan 16, 2024

To state the obvious, another workaround is to always leave a tab open. For example, some tab can be pinned, since pinned tabs are not as easy to close as regular tabs are.

@iripu
Copy link

iripu commented Mar 13, 2024

I have tried other sidebar tabs extensions and none of them has this problem, only sidebery.

@ahahahaah
Copy link

Open sidebery settings >> Navigation bar >> Panel config and enable "Create new tab after the last one is closed"

i don't have "panel config" nor "create new tab after the last one is closed".

@kabuda2077
Copy link

打开sidebery设置>>导航栏>>面板配置并启用“关闭最后一个选项卡后创建新选项卡”

我没有“面板配置”,也没有“最后一个选项卡关闭后创建新选项卡”。

Right-click the navigation bar icon, the third from the bottom is the configuration panel

@ahahahaah
Copy link

打开sidebery设置>>导航栏>>面板配置并启用“关闭最后一个选项卡后创建新选项卡”

我没有“面板配置”,也没有“最后一个选项卡关闭后创建新选项卡”。

Right-click the navigation bar icon, the third from the bottom is the configuration panel

thank you sir

@mbnuqw mbnuqw closed this as completed in e64b65b Apr 6, 2024
@ahahahaah
Copy link

even with the "create new tab after the last one is closed" option activated the problem still occurs if we close the last firefox opened tab (tabs that are horizontal in the firefox tab bar).

@ZaWertun
Copy link

ZaWertun commented Jun 6, 2024

Is it fixed?
I can reproduce this issue with Sidebery 5.2.0 and Firefox 126.0.

@martinlbrook
Copy link

Not yet in the stable version, but I've downloaded the nightly release (5.2.0.8) and can confirm that it's fixed.

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

9 participants