You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Dropdown widget is collapsed, any keyboard inputs supported by JupyterLab are intercepted and interpreted by JLab instead of the dropdown.
Seems related to #3836, which is still open but the discussion suggests it was fixed long ago.
Reproduce
Create a cell containing the following code:
import ipywidgets as widgets
from ipywidgets import interact
@interact(name=widgets.Dropdown(options=['1', '2', '3', 'A', 'B', 'C']))
def report(name):
print(f'Output: {name}')
Execute the cell
Click the dropdown and press the A key on your keyboard.
Observe that the "A" item in the list is selected (correct behavior).
Click the "1" item in the list to select it.
Observe that the dropdown has collapsed and the border is blue, indicating that it should have focus.
Press A on your keyboard again.
Observe that JupyterLab adds a cell above the current one (incorrect behavior) instead of selecting the "A" item in the list as expected
Click the dropdown again, then once more to collapse it.
Press the up or down arrows on your keyboard
Observe that JupyterLab changes cells (incorrect behavior) instead of changing the dropdown value as expected
Expected behavior
I expect that, when the dropdown widget is blue, any keyboard inputs that make sense in a normal dropdown will be interpreted and executed by the dropdown, not by JupyterLab.
Context
This occurs on a brand new install of JupyterLab and ipywidgets from PyPI.
ipywidgets version: 8.1.1
Operating System and version: Windows 10 22H2 (build 19045.4170)
[I 2024-04-29 19:19:48.659 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-04-29 19:19:48.665 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-04-29 19:19:48.674 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-04-29 19:19:48.683 ServerApp] notebook | extension was successfully linked.
[I 2024-04-29 19:19:49.075 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-04-29 19:19:49.129 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-04-29 19:19:49.131 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-04-29 19:19:49.132 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-04-29 19:19:49.138 LabApp] JupyterLab extension loaded from C:\Users\(redacted)\AppData\Roaming\Python\Python310\site-packages\jupyterlab
[I 2024-04-29 19:19:49.138 LabApp] JupyterLab application directory is C:\Users\(redacted)\AppData\Roaming\Python\share\jupyter\lab
[I 2024-04-29 19:19:49.139 LabApp] Extension Manager is 'pypi'.
[I 2024-04-29 19:19:49.155 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-04-29 19:19:49.162 ServerApp] notebook | extension was successfully loaded.
[I 2024-04-29 19:19:49.164 ServerApp] Serving notebooks from local directory: C:\Users\(redacted)
[I 2024-04-29 19:19:49.164 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-04-29 19:19:49.164 ServerApp] http://localhost:8888/lab?token=(redacted)
[I 2024-04-29 19:19:49.165 ServerApp] http://127.0.0.1:8888/lab?token=(redacted)
[I 2024-04-29 19:19:49.165 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2024-04-29 19:19:49.232 ServerApp]
To access the server, open this file in a browser:
file:///C:/Users/(redacted)/AppData/Roaming/jupyter/runtime/jpserver-81844-open.html
Or copy and paste one of these URLs:
http://localhost:8888/lab?token=(redacted)
http://127.0.0.1:8888/lab?token=(redacted)
[I 2024-04-29 19:19:49.309 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[W 2024-04-29 19:19:52.194 LabApp] Could not determine jupyterlab build status without nodejs
[W 2024-04-29 19:20:37.725 ServerApp] Notebook (redacted) is not trusted
[I 2024-04-29 19:20:38.321 ServerApp] Kernel started: 714b96a8-eec8-4606-9a43-e240052a3128
[I 2024-04-29 19:20:39.907 ServerApp] Connecting to kernel 714b96a8-eec8-4606-9a43-e240052a3128.
[I 2024-04-29 19:20:39.932 ServerApp] Connecting to kernel 714b96a8-eec8-4606-9a43-e240052a3128.
[I 2024-04-29 19:20:39.955 ServerApp] Connecting to kernel 714b96a8-eec8-4606-9a43-e240052a3128.
[W 2024-04-29 19:20:40.010 ServerApp] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x000001B7AF8B7520>
[W 2024-04-29 19:20:40.037 ServerApp] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x000001B7ADEB9FF0>
[I 2024-04-29 19:22:27.822 LabApp] sys_prefix level settings are read-only, using user level for migration to lockedExtensions
[I 2024-04-29 19:22:27.838 LabApp] sys_prefix level settings are read-only, using user level for migration to lockedExtensions
[I 2024-04-29 19:22:27.855 LabApp] sys_prefix level settings are read-only, using user level for migration to lockedExtensions
[I 2024-04-29 19:22:38.627 ServerApp] Saving file at (redacted)
[W 2024-04-29 19:22:38.628 ServerApp] Notebook (redacted) is not trusted
[I 2024-04-29 19:22:58.356 LabApp] sys_prefix level settings are read-only, using user level for migration to lockedExtensions
[I 2024-04-29 19:22:58.373 LabApp] sys_prefix level settings are read-only, using user level for migration to lockedExtensions
[I 2024-04-29 19:22:58.389 LabApp] sys_prefix level settings are read-only, using user level for migration to lockedExtensions
[I 2024-04-29 19:23:02.266 ServerApp] Starting buffering for 714b96a8-eec8-4606-9a43-e240052a3128:d414ed7d-c4b1-4b06-9bb8-37cfe1af58fc
[W 2024-04-29 19:23:03.155 LabApp] Could not determine jupyterlab build status without nodejs
[I 2024-04-29 19:23:03.202 ServerApp] Connecting to kernel 714b96a8-eec8-4606-9a43-e240052a3128.
[I 2024-04-29 19:23:03.399 ServerApp] Starting buffering for 714b96a8-eec8-4606-9a43-e240052a3128:8240243c-55cd-47be-ab84-02e1024ea489
[W 2024-04-29 19:23:03.627 ServerApp] Notebook (redacted) is not trusted
[
Browser Output
JupyterLab extension jupyterlab-execute-time is activated!
jlab_core.b91074b1e57242ddcd31.js?v=b91074b1e57242ddcd31:1 Scrolling to a new item is requested.
If using JupyterLab
JupyterLab version: 4.1.8
Installed Labextensions
jupyter-matplotlib v0.11.4 enabled ok
jupyterlab-execute-time v3.1.2 enabled ok (python, jupyterlab_execute_time)
jupyterlab_pygments v0.3.0 enabled ok (python, jupyterlab_pygments)
@jupyter-notebook/lab-extension v7.1.3 enabled ok
@jupyter-widgets/jupyterlab-manager v5.0.10 enabled ok (python, jupyterlab_widgets)
The text was updated successfully, but these errors were encountered:
Description
When a Dropdown widget is collapsed, any keyboard inputs supported by JupyterLab are intercepted and interpreted by JLab instead of the dropdown.
Seems related to #3836, which is still open but the discussion suggests it was fixed long ago.
Reproduce
A
key on your keyboard.A
on your keyboard again.up
ordown
arrows on your keyboardExpected behavior
I expect that, when the dropdown widget is blue, any keyboard inputs that make sense in a normal dropdown will be interpreted and executed by the dropdown, not by JupyterLab.
Context
This occurs on a brand new install of JupyterLab and ipywidgets from PyPI.
Troubleshoot Output
Command Line Output
Browser Output
If using JupyterLab
Installed Labextensions
The text was updated successfully, but these errors were encountered: