I tracked this 'Reported Issue' back 4 years (#1627 - 2014) and wish to add a small observation. Code should work consistently, given the specifications.
A simple statement like: input ("this is my message, enter 1 or 2") should divert the Focus from the editor(Spyder) to the Console, should it not?
In my pure Linux Mate/Mint version 18.3, the Focus remains in the editor!
The same code in DrPython, it does not. It works as I expect.
The same statement in Trinket (web python) also has the same problem, necessitating a click on the input block. Try this...
I appreciate legacy software that relies on the way it always worked (Matlib likes to have the focus back in the editor, for example) must be considered, but is not the "older" issue here the original documented Python 2.7 or Spyder specification?
Is it possible this is an OS issue? - bigger than a language, an editor/ide, or implementation?
"Run selection (F9) changes focus to Python interpreter, but ex-Matlab users expect the focus to remain on the editor #1627"
"Add an option to move focus to console after pressing F5 #2123"
"Console/Editor lose focus when auto-connected to help #3317"
Chrome devtool shortcuts
The Plot Thickens....
From the table (hopefully) below, you can see not all Browsers are alike.
It seems to me that since the code is the same, the OS I am using is the same, this issue must be either Browser/IDE related or higher. My Andriod tablet got focus and then lost it (block cursor blinked and then stopped).
The Table shows out of 9 programs, 5 Lost Cursor