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

Jupyter Notebook stoles keyboard commands when WebView is focused #16028

Open
1 of 2 tasks
iurii-iufimov-forgood opened this issue Sep 10, 2024 · 3 comments
Open
1 of 2 tasks
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-workflow Issues that interrupt expected or desirable behavior

Comments

@iurii-iufimov-forgood
Copy link

iurii-iufimov-forgood commented Sep 10, 2024

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

To reproduce the bug you need to have another extension that uses webview. For example:
https://github.com/microsoft/vscode-extension-samples/tree/main/webview-view-sample

Steps:

  1. Start VSCode with Jupyter and WebView-based extensions enabled
  2. Run "Create: New Jupyter Notebook" command
  3. (Create and) focus new code cell
  4. Focus text input inside WebView ("Explorer -> Calico Colors -> New color" in the provided example extension)
  5. Run text edit command via keyboard (e.g "Ctrl/Cmd+X" to cut)
    Actual result:
    Code cell is removed.
    Same is actual for other text edit commands: Paste, Cut, Undo, Redo
    Expected result:
    Text edit commands inside webview don't affect opened Jupyter Notebook

VS Code Version

Version: 1.92.2 Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9 Date: 2024-08-14T17:29:30.058Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.1.0

Jupyter Extension Version

v2024.8.1

Jupyter logs

Visual Studio Code (1.92.2, undefined, desktop)
Jupyter Extension Version: 2024.7.0.
Python Extension Version: 2024.14.0.
Pylance Extension Version: 2024.9.1.
Platform: darwin (arm64).
No workspace folder opened.

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

N/A or Not sure

@iurii-iufimov-forgood iurii-iufimov-forgood added the bug Issue identified by VS Code Team member as probable bug label Sep 10, 2024
@vs-code-engineering vs-code-engineering bot added the triage-needed Issue needs to be triaged label Sep 10, 2024
@DonJayamanne
Copy link
Contributor

Thank you for filing this issue and sorry you are running into this.
Do you experience similar issues with regular text editors open.
I.e. open a text file and try to replicate this same issue with the webview.
Asking as I'd like to determine whether this issue is scoped to just the Jupyter Notebooks or other editors as well

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster notebook-workflow Issues that interrupt expected or desirable behavior and removed triage-needed Issue needs to be triaged labels Sep 11, 2024
@iurii-iufimov-forgood
Copy link
Author

@DonJayamanne , no, regular text editors don't produce the same error.

Screen.Recording.2024-09-12.at.11.59.14.mov

@iurii-iufimov-forgood
Copy link
Author

Oh, now I've got your question. No, actions in Webview don't affect regular text editors, only the Jupyter Notebook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-workflow Issues that interrupt expected or desirable behavior
Projects
None yet
Development

No branches or pull requests

2 participants