Time for the Standard Mac App Troubleshooting Steps™
0) Turn off all plugins/extensions
You did this already :)
1) Trash the preferences for the app
You said that you're using stock everything, so this shouldn't result in too much trouble.
Shut down Safari, then open a Finder window, hit cmd-shift-G, and enter ~/Library/Safari
. Move the entire contents of this folder somewhere else, either into your trash can or a folder on the desktop.
This will probably solve the problem. Safari is probably choking on something like the history database or some other bit of nonessential stored data.
Start it back up. Problem still exist? Close it down, then:
2) Verify the disk
Sounds trite, but this can cause Weird Stuff to happen. Go to Applications → Utilities → Disk Utility, click on your main hard disk, and select First Aid on the menubar. Let the process run. Did it fix any errors? If not...
3) New user profile
Not quite the nuclear option - but in short, make a new user account and see if Safari behaves the same on that account. Everything should be clean here, and this shouldn't happen.
If it does, something on the system is very, very broken, and you'd need to look into:
4) Recovery install
We've now determined something on the system is trashed. Back up your data and programs, then reboot your machine holding r after the chime, and reinstall Mac OS.
You can use Keyboard Maestro to overwrite that ambiguous behavior in Safari and map ⌘←/⌘→ to switch between tabs regardless of any context (text field, history availability), to make it work just like it does in Chrome.
It's a pretty straightforward macro like "When ⌘← hotkey is pressed, execute “Previous Safari Tab” action" in a macro folder limited to Safari. However, Keyboard Maestro is not free.
Maybe you could also create a free Applescript service to run Window⟶Show Next Tab
command (since this command ignores context, unlike the respective keyboard shortcut) and change system shortcut ⌘←/⌘→ to run that service instead (would like need to add Safari to Accessibility to allow a script manipulating menu items).
Best Answer
Using hammerspoon. After installing hammerspoon (I used
brew cask install hammerspoon
), just edit/create the file~/.hammerspoon/init.lua
to include:Then start Hammerspoon.app.
Then enable Hammerspoon control in System Preferences > Security & Privacy > Privacy > Accessibility. (Maybe you will need to Reload Config from Hammerspoon's menu bar item after this).