When I switch to one of my workspaces with Chrome, it jumps to the other Chrome workspace

I make heavy use of workspaces, and tend to have a lot of workspaces, most of which only have one window. I pretty much always have two different workspaces that have a window of Google Chrome open.

Ever since I updated from Yosemite to High Sierra, I've had this weird issue where, when I switch to one of the Chrome workspaces, it'll instantly jump to the other Chrome workspace (even though there's like 4 other workspaces between them).

I can't seem to figure out the precise set of conditions that causes this; it's random as far as I can tell (although, infuriatingly, once it does happen, it'll probably happen again immediately after when I try to correct). It can happen whether I'm switching workspaces via keyboard shortcut or trackpad gesture, but I don't think I've ever seen it happen if I open Mission Control to switch workspaces. I've only seen it happen with Chrome, but then, Chrome is the only application that I ever have open in multiple workspaces.

I've tried toggling the "When switching to an application, switch to a Space with open windows for the application." option in System Preferences->Mission Control, but it happens whether this is turned on or off.

Does anyone know what might be causing this and how I might fix it?


Solution 1:

The only work-around I've found for this is to move the window that keeps stealing focus to another workspace. If I move it back to the previous workspace it will exhibit the same behaviour, so I need to delete that workspace and create it again, and then move the window back to it.

Upgrading to 10.13.2 didn't fix it for me.

Update: Upgraded to 10.13.3 and the issue is still there.

Solution 2:

Via @stickj in the comments way above, this seems to have worked for me:

By way of Apple forum: https://discussions.apple.com/thread/4995042

Do this in terminal:

defaults write com.apple.dock workspaces-auto-swoosh -bool NO 

followed by

killall Dock

The latter restarts the Dock to apply the prefs change. Alternatively, reboot (though why when you can restart the service :)).

There is a caveat:

Thank you for this. But now the problem is that when you click on an icon in the Dock it won't take you to that app and when you have a lot of things open across different desktops it sometimes is hard to find the app you're looking for.

One person suggests:

There's a easier solution (if I'm reading the OP's post correctly). -- Go to System Preferences/Mission Control and uncheck the box that says "When swithching applications, switch to another space with open windows for that application."

But this option actually seems to override that selection. (Toggling that selection does not change this option, this option does not exist until you've written to it).