No focus when entering a Jupyter Notebook tab
See original GitHub issueBug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
- Open a tab with a .ipynb file with some cells (Python extension must be installed)
- move a bit around: pressing
j
you select the next cell - now move the focus away from the tab and put it back in to the notebook tab, for instance press twice
CMD+`
in macOS to show and hide the terminal. - now you would expect to be able to interact with the notebook with the keyboard, for instance pressing
k
you would expect to select the cell above, but nothing happens - to restore the focus you have to click with the mouse in one cell
Actual behavior
Once going away from a .ipynb tab and going back in the focus is lost and you have to use click with the mouse to restore the focus
Expected behavior
Focus should be on the notebook, as what it happens with any source code tab.
Your Jupyter and/or Python environment
Please provide as much info as you readily know
- Jupyter server running: Local | Remote | N/A
- Extension version: 2020.4.74986
- VS Code version: March 2020 (version 1.44)
- Setting python.jediEnabled: false
- Python and/or Anaconda version: Python 3.7.6
- OS: Mac 10.15.3
- Virtual environment: conda
Developer Tools Console Output
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:7 (3 by maintainers)
Top Results From Across the Web
No focus when entering a Jupyter Notebook tab #1616 - GitHub
Workaround to restore focus without using the mouse: Tab , then Enter restores the focus to the notebook after switching back to that...
Read more >jupyter notebook - Tab does not tab and lets me out the code
On the bottom right in the status bar it will say "Tab Moves Focus". Press ctrl + m .
Read more >Optimizing Jupyter Notebook: Tips, Tricks, and nbextensions
Alt + Enter run the current cell, insert below; Ctrl + S save and checkpoint. Shortcuts when in edit mode: Esc take you...
Read more >tabs no longer visible in JupyterLab - Google Groups
I have the tabs menubar open showing that there is a notebook tab and a text editor tab. However there are no tabs...
Read more >How to enable Autocompletion in Jupyter Notebook application
This article demonstrates how to enable Python/Jupyter application coding autocompletion feature. The demo application uses content from ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue here. I should emphasize that any action that moves focus away from the tab causes this issue.
Further observations: if you are in a markdown cell,
Alt+Tab
away from vscode makes the notebook to go into command mode, and need to click the cell to make it editable. This does not happen when in a code cell.Thanks for your feedback. This issue will be addressed once VS Code adds native support for editing notebooks. Please see https://github.com/microsoft/vscode/issues/91987. You can experiment by using VS Code insiders, which defaults to the new notebook experience.