Preventing desktop jump when window is open on another desktop?
At least on El Capitan, it is (apparently) necessary to restart the Dock after setting the value of workspaces-auto-swoosh

On the command line:

defaults write com.apple.dock workspaces-auto-swoosh -boolean NO
killall Dock