How to switch focus to the application that opens the link/file from an email? At some of point in the past I changed some setting in system preferences on my mac.
Since then, when I click on a link or double click on an attached pdf, the focus does not shift to the application that opened the link or file.
Earlier it would switch to the desktop in which the application was running.
How do I go back to the earlier behaviour/setting?
I am on macOS Catalina 10.15.6.
I found the solution, albeit it was an answer to a different question.
This fixed another problem I was having wherein I had to click on an application in the dock, twice, to switch to it. This is now fixed. I ran the following commands
defaults write com.apple.dock workspaces-auto-swoosh -bool YES

then restart the Dock with the command:
killall Dock