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 > 7 keyboard shortcuts get active when typing in a Textarea #3926

Open
agoscinski opened this issue Jun 30, 2024 · 2 comments

Comments

@agoscinski
Copy link

agoscinski commented Jun 30, 2024

Description

The keyboard shortcuts from jupyter notebook get activate when I type into a Textarea. For example I cannot type a without creating a new cell. I checked ipywidgets 8.1.3, notebook 7.2.1, but also older versions ipywidgets 8.0.0, notebook 7.0.2. I am a bit confused, since I did not have this issue 6 months ago with the old versions. My only guess is that it is the brower somehow, but I might forgot to downgrade something else? Tried Firefox (127.0.2) and Vivaldi (6.7.3329.35 stable). The error seems to also appear on the GitHub CI on this branch https://github.com/osscar-org/scicode-widgets/tree/fix/black-24-upgrade (there are information about the environment in the pyproject.toml and the tox environment tests-notebook-7)

Reproduce

from ipywidgets import Textarea
Textarea()
# press a

Expected behavior

Keyboard shortcuts should be ignored when typing text into Textarea.

Context

  • ipywidgets version >= 8.0.0
  • notebook >= 7.0.2 (no extensions)
  • Operating System and version: Ubuntu 22.04 LTS
  • Browser and version: Firefox (127.0.2) and Vivaldi (6.7.3329.35 stable).

EDIT: Also tried on macOS Sonoma 14.5 with Safara 17.5 and Vivaldi, same issue.
EDIT: Tried old Firefox version (102.0) to check why I did not have this issue 6 months ago but the problem also appears there too

@rsnell-usgs
Copy link

rsnell-usgs commented Sep 14, 2024

I am also seeing this breaking issue and have some additional information from testing different versions of Jupyter, ipywidgets, and browsers.

  • First, I am using Windows 10 (22H2) and am seeing this problem in Edge (128.0.2739.67) but not in Firefox (130.0).
  • The problem also affects text widgets, not just textarea widgets.
  • I can install back to the first release of Notebook v7 (7.0.0) and it appears to have broken from that point and is still broken in the current Notebooks version (7.2.2).
  • The same code works fine in a newly installed last version of Notebook v6 (6.5.7).
  • The problem does not occur in JupyterLab (tested in 4.2.5 that came with the install of notebook 7.2.2). This issue is isolated to code running in Notebook.
  • I've not tested all keys to see what works and what doesn't but c and v trigger shortcuts (copy cell and paste cell respectively) whereas f is captured by the text widget successful.

Is there any update on when this will be looked in to? It is a pretty big problem. Thanks.

Reproduce:

import ipywidgets
ipywidgets.Text()

Context

ipywidgets version = Problem seen in testing with both 7.6.6 and 8.1.5
notebook >= 7.0.0
Operating System and version: Windows 10 Enterprise (22H2)
Browser and version: Fails in Edge (128.0.2739.67). Works in Firefox (130.0)

@creative-resort
Copy link

creative-resort commented Sep 16, 2024

In JupyterLab (not Notebook as in original issue post),
with the following, I'm able to press the "a" key and type text, except for the Enter key, to which there is no reaction at all, just fine:

ipywidgets version 8.1.5
Operating System and version: Debian 11.21
Browser and version: Brave for Windows (11) 1.69.168 Chromium 128.0.6613.138 64-Bit
JupyterLab version: 4.2.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants