SafariStand icon indicating copy to clipboard operation
SafariStand copied to clipboard

cmd+w closes the whole window instead of the active tab (9.0.215)

Open zdlo opened this issue 8 years ago • 6 comments

Command+w closes the whole window with all tabs, instead of only the selected tab.

"Close tab" is greyed out under File menu on Safari. There is no key combination that closes only the selected tab, nor any shortcut can be assigned to do so.

The only way to close an active tab with SafariStand 9.0.215 is to use the mouse and click the cross on the tab.

Running SafariStand 9.0.215Yosemite on Safari 9.0 on OS X El Capitan 10.11.

zdlo avatar Oct 01 '15 19:10 zdlo

Running SafariStand 9.0.215Yosemite on Safari 9.0 on OS X Yosemite 10.10.5 and Command-w works as usual, closing only the active tab.

gkarag avatar Oct 01 '15 20:10 gkarag

This is also occurring to me, exactly as it was described by @zdlo, but only when the "Hide Tabbar If Sidebar Exists" option is Enabled. By disabling that option, or the sidebar itself, Cmd+W works as usual.

EdDuarte avatar Oct 03 '15 00:10 EdDuarte

Interestingly I am not having this issue, regardless of my "Hide Tabbar If Sidebar Exists" setting, running SafariStand 9.0.215Yosemite on Safari 9.0 on OS X Yosemite 10.10.5.

I am guessing this may be an issue then, specifically with SafariStand and that setting when running OS X El Capitan 10.11.

Fofer avatar Oct 08 '15 14:10 Fofer

Forgot to mention that I was also running Safari 9.0 on OS X El Capitan 10.11.

I looked through the code and found out that the logic of toggling the tab bar on and off is handled by the "toggleTabBar" method in the NSWindow controller, which is called by SafariStand here: https://github.com/hetima/SafariStand/blob/0dfacb45a26278de3e7ff4001b9e1221796a2426/SafariStand/modules/STSidebarModule.m#L269

So, like @Fofer mentioned, this looks like an issue specific to El Capitan's way of dealing with tab bar's visibility. I would guess that, based on the fact that you can only hide the tab bar on Finder if the Finder window has only one tab (hence, Cmd+W will close that window), if the tab bar is hidden then Safari assumes that there is only one tab, disabling the "File -> Close Tab" option and closing the window on Cmd+W. In fact, if you open a new Safari window with a single tab, you will see that exact behaviour.

EdDuarte avatar Oct 08 '15 15:10 EdDuarte

The same issue happens to me, but it happens even when I have my tab bar shown. So @edduarte, your analysis doesn't apply to my situation.

Also running OS X 10.11. My tab bar is always shown and I use a few pinned tabs.

isaidboourns avatar Oct 21 '15 15:10 isaidboourns

In my situation, running El Cap 10.11.15, the "Hide Tabbar If Sidebar Exists" definitely affects the behavior of CMD-W. I unchecked that option in SafariStand settings, but the Cmd-W behavior was the same in that it would close the whole window. But when I quick Safari, and then started it up again, the behavior returned to the old (desired) behavior of having Cmd-W only closing the active tab.

It'd be great to get this feature working in ElCap so that I could gain a couple more pixels of usable vertical space.

Cheers!

petonic avatar May 27 '16 00:05 petonic