microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.27k stars 280 forks source link

Can't Paste into ipywidgets.Text Element on Mac #15787

Open jeffeth-donaldson opened 2 months ago

jeffeth-donaldson commented 2 months ago

Applies To

What happened?

Same Issue as #15154. I can't paste into a ipywidgets.Text widget, but I can paste into a ipywidgets.HTML widget containing an <input type="text">

I followed that Issue's suggested debugging steps and here's the output:

Output from Keyboard Shortcuts Troubleshooting: Pasting into HTML:

2024-06-21 09:04:50.305 [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta')
2024-06-21 09:04:50.305 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-06-21 09:04:51.699 [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: KeyV, keyCode: 86, key: v
2024-06-21 09:04:51.700 [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: KeyV, keyCode: 52 ('V')
2024-06-21 09:04:51.700 [info] [KeybindingService]: | Resolving meta+[KeyV]
2024-06-21 09:04:51.700 [info] [KeybindingService]: \ From 4 keybinding entries, matched editor.action.clipboardPasteAction, when: no when condition, source: built-in.
2024-06-21 09:04:51.701 [info] [KeybindingService]: + Invoking command editor.action.clipboardPasteAction.
2024-06-21 09:04:51.922 [info] [KeybindingService]: + Storing single modifier for possible chord meta.
2024-06-21 09:04:52.224 [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

Pasting into Text:

2024-06-21 09:06:48.859 [info] [KeybindingService]: + Storing single modifier for possible chord meta.
2024-06-21 09:06:49.194 [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

No Errors in the Developer Tools console, just the same output from the Keyboard Shortcuts Troubleshooting: Pasting into HTML: image

Pasting into Text: image

VS Code Version

Version: 1.90.2 (Universal) Commit: 5437499feb04f7a586f677b155b039bc2b3669eb Date: 2024-06-18T22:37:41.291Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

Jupyter Extension Version

v2024.5.0

Jupyter logs

10:26:44.936 [info] Restarted 2e7ea99c-f94c-44d8-9cd5-53bf5d5c322f
10:27:32.402 [info] Restart requested ~/example.ipynb
10:27:32.448 [info] Process Execution: ~/venv/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
10:27:32.493 [info] Process Execution: ~/venv/bin/python -m ipykernel_launcher --f=~/.local/share/jupyter/runtime/kernel-v2-184622uwo3nKV6Kvf.json
    > cwd: /~/sparkmagic
10:27:34.673 [info] Restarted 2e7ea99c-f94c-44d8-9cd5-53bf5d5c322f

Coding Language and Runtime Version

Python 3.8.13

Language Extension Version (if applicable)

v2024.8.1

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

amunger commented 2 months ago

@DonJayamanne - the output element within the iFrame looks similar to having plain HTML in the output, but it's acting like there is some associated javascript that is preventing keyboard events from leaving the element. I'm not familiar with how IPywidgets are rendered, but are there some scripts that get injected into the output somewhere?

jeffeth-donaldson commented 2 months ago

@amunger Just want to check in and see if you need any more information from me. If the previous question was directed at me, sorry I'm not sure. Thanks