Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When in ipynb, keyboard shortcut to close window or new tab triggers twice #2287

Closed
shern2 opened this issue Feb 15, 2020 · 7 comments
Closed
Assignees

Comments

@shern2
Copy link

shern2 commented Feb 15, 2020

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

scenario1: Closing a notebook

  1. Open a text file (e.g. tmp.txt) and open a notebook file.
  2. Click on a cell to enter edit mode.
  3. Hit ctrl+w to close window.

scenario 2: Create new untitled file

  1. Open a notebook.
  2. Click on a cell to enter edit mode.
  3. Hit ctrl+n to create new untitled file.

Actual behavior

Closing a notebook: both files are closed
Create new untitled file: 2 new files created

Expected behavior

Closing a notebook: Only opened file is closed
Create new untitled file: Only 1 new file created

  • Jupyter server running: Local
  • Extension version: 2020.2.63072
  • VS Code version: 1.42.0
  • Setting python.jediEnabled: true
  • Python and/or Anaconda version: Python 3.7.6; conda 4.6.14
  • OS: Linux (distro): Ubuntu
  • Virtual environment: conda
@IanMatthewHuff
Copy link
Member

Hey @shern2 Thanks for reporting this and sorry about the issue. I'm trying to repro this issue now myself and I'm currently not seeing it:
OpenNew

Could you send the output of the vs code Help->Toggle Developer Tools console log? That would have some output that might help me with diagnosing what is going on in this scenario. You can just right click on that console log to save off a copy of it.

@shern2
Copy link
Author

shern2 commented Feb 19, 2020

Thanks @IanMatthewHuff . Here's the logs:

Scenario 1: vscodeBug_ctrlN.log
(1) New Jupyter Notebook
(2) focus within a cell and ctrl+n
(3) This resulted in "Untitled-1" and "Untitled-2" text files being created
(4) ctrl+w to close "Untitled-1"

Scenario 2: vscodeBug_ctrlW.log
(1) New Jupyter Notebook
(2) focus within a cell and ctrl+n
(3) This resulted in "Untitled-1" and "Untitled-2" being created
(4) Switch back to the newly created notebook
(5) ctrl+w resulted in closing of notebook as well as "Untitled-2" text file

@IanMatthewHuff
Copy link
Member

@shern2 Thanks for providing those logs. We actually just pushed out a point release yesterday. Would you mind updating to that (the extension should update automatically) and checking again? Also just to confirm, This is only in the notebook view? You don't see the double commands in normal code files of any type?

Sorry about the extra questions, just still in the dark a bit here. Nothing revealing in the logs and we shouldn't be intercepting or messing with those vscode keybindings at all.

@shern2
Copy link
Author

shern2 commented Feb 21, 2020

@IanMatthewHuff
Yup. Python extension version 2020.2.63990 (19 February 2020). Bug still persists in both scenarios.

Yes. This is only in the notebook view. I don't see double commands in .py files or other text files .txt etc.

No worries about extra qns.

Ctrl+N Issue:

ctrlN_200221

Ctrl+W Issue:

ctrlW_200221

@greazer
Copy link
Contributor

greazer commented Feb 24, 2020

Similar behavior to #2251.

@IanMatthewHuff
Copy link
Member

Yeah, we're confirmed this repros on Linux only. Bumping back to triage for consideration.

@IanMatthewHuff IanMatthewHuff self-assigned this Feb 27, 2020
@IanMatthewHuff
Copy link
Member

Resolving this issue as it looks to be a general vscode issue. This is the issue to watch for the fix for this:
microsoft/vscode#90579

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants