Skip to content

Jupyter Notebook stoles keyboard commands when WebView is focused #251657

Closed
@iurii-iufimov-forgood

Description

@iurii-iufimov-forgood

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: fee1edb 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

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersnotebook-workflowIssues that interrupt expected or desirable behaviortriage-neededverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions