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

Persistent issues with keyboard and JupyterLab (jupyter minimal docker) on Brave Browser #15907

Closed
diyoyo opened this issue Mar 4, 2024 · 7 comments
Labels
bug status:Duplicate status:Needs Triage Applied to new issues that need triage tag:Keyboard Compatibility issues with keyboards, including locale-specific and layout-specific issues

Comments

@diyoyo
Copy link

diyoyo commented Mar 4, 2024

Description

Since 4.0.x and up to latest (4.1.2), I've been experiencing issues with keyboard shortcuts on Brave. There was no way to block comment or line comment with any keyboard shortcut of any keyboard layout (as often discussed on SOF).
Now, a new bug appeared only in the recent releases (since 4.0.11 or so?) making me unable to use the closing accolade } in a code cell 🤯 (or even a md cell, for that matters) !

I've realized only recently that this bug is not present when using Firefox, but I still want to report it because it is very strange, imho! Also I wouldn't want to force myself to use Firefox just because of this.

Reproduce

  1. Start your jupyter-minimal docker
  2. Open your Brave Browser
  3. Open a notebook
  4. Type a closing accolade } anywhere in your code.
    Note: this means using Option + ) on a MacbookPro FR keyboard.
  5. Nothing happens

Reproduce v2

Just tried the following to exclude other hypotheses:

  • Started a VM with Ubuntu latest, all updates installed.
  • Pulled Jupyter-minimal.
  • By mistake, pulled v4.0.7 from DockerHub rather than v4.1.2 from quay.io
  • Back on Mac+Brave : accolades are working fine
  • Removed docker container
  • Pulled Jupyter-Minimal v4.1.2 from quay.io
  • Back on Mac+Brave : accolades are no longer working !!!

Expected behavior

A closing accolade }

Context

  • Operating System and version: MacOS latest, French laptop keyboard.
  • Browser and version: Brave latest, with disabled protections for local http use of jupyterlab
  • JupyterLab version: from 4.0.x to latest 4.1.2
  • Docker image: jupyter-minimal with persistent settings on mounted volume (but the problem is present with bare container with no presets)
  • Bug not present when keeping the same environment and replacing only the Browser from Brave to Firefox
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
@diyoyo diyoyo added the bug label Mar 4, 2024
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Mar 4, 2024
@diyoyo
Copy link
Author

diyoyo commented Mar 4, 2024

Ok, here is the new troubleshooting I performed:

  • upgrading JupyterLab stepwise from 4.0.7 to 4.1.1 on my fresh Ubuntu VM with Docker. Pulling from quay.io
  • Testing back on Mac + either Brave, Edge or Firefox
  • Between each attempt, I removed the generated "home" folder

Here are the results:

  • 4.0.7, 4.0.8, 4.0.9, 4.0.10, 4.0.11 : Everything works fine on every browser
  • 4.1.0 : Bug everywhere, even on Firefox. Not for the closing accolade } Option+) but for the opening accolade { Option + 5 . Actually, this shortcut triggers the expand/collapse of the leftside menubar
  • 4.1.1 : Everything works fine on Firefox, but now the bug of the closing accolade bug appeared on all Chromium-based browsers (here Edge and Brave)
  • 4.1.2 : Same as 4.1.1

@diyoyo
Copy link
Author

diyoyo commented Mar 4, 2024

Since I was on a troubleshooting high, I went on with the same tests to understand when exactly the "Block-comment" bug started happening on chromium-based browsers.

Here is what I tried:

  • Pulling jupyter-minimal:lab-v{3.6.3, 4.0.2} from Docker Hub.
  • Testing on Mac + Brave, Edge or Firefox

Results:

  • 3.6.3:
    - Block comment not working on Firefox (neither Cmd+Shift+/ nor Fn+Option+= as usual on Mac-FR) but working with Fn + Option + = on Brave and Edge
  • 4.0.2:
    - Block comment working on Firefox with Cmd + Shift + / but not on Brave nor Edge with any of the shortcuts Fn + Option + = or Cmd + Shift + /

PS: interestingly, for that running v4.0.2, If I run raw Chromium directly on that Ubuntu VM (still on Mac), then, the shortcut works fine: Ctrl + Shift + / (note that Cmd is replaced by Ctrl though)

@JasonWeill JasonWeill added the tag:Keyboard Compatibility issues with keyboards, including locale-specific and layout-specific issues label Mar 4, 2024
@krassowski
Copy link
Member

making me unable to use the closing accolade } in a code cell

Can you please try with just released JupyterLab 4.1.3 which includes #15790 meant to fix this?

There was no way to block comment or line comment with any keyboard shortcut of any keyboard layout (as often discussed on SOF)

This is tracked in the existing issues on the commenting shortcuts:

which all come down to limitations of default CodeMirror shortcuts (in JupyterLab 3 of CodeMirror5, in JupyterLab 4 of CodeMirror 6) and JupyterLab being in need to implement a custom shortcut pass through for such native CodeMirror functions.

@diyoyo
Copy link
Author

diyoyo commented Mar 5, 2024

making me unable to use the closing accolade } in a code cell

Can you please try with just released JupyterLab 4.1.3 which includes #15790 meant to fix this?

There was no way to block comment or line comment with any keyboard shortcut of any keyboard layout (as often discussed on SOF)

This is tracked in the existing issues on the commenting shortcuts:

which all come down to limitations of default CodeMirror shortcuts (in JupyterLab 3 of CodeMirror5, in JupyterLab 4 of CodeMirror 6) and JupyterLab being in need to implement a custom shortcut pass through for such native CodeMirror functions.

Is the image already available? I pulled quay.io/jupyter/minimal-notebook:latest but the 'About' menu mentioned 4.1.2... Also: quay.io/jupyter/minimal-notebook:lab-4.1.3 does not exist...

@JasonWeill
Copy link
Contributor

@diyoyo The Docker images are produced from jupyter-docker-stacks. You can open an issue here — https://github.com/jupyter/docker-stacks/issues — if you don't see 4.1.3 images yet.

@JasonWeill
Copy link
Contributor

Closing in favor of #15525. @diyoyo let's keep the conversation going in the previous issues if this is still a problem for you. Thanks!

@diyoyo
Copy link
Author

diyoyo commented Mar 7, 2024

Just a note for other weirdos like me: There is no need to wait for a bot to release the newest docker image, since the only required thing is to do:
pip install --upgrade jupyterlab

Then restart, + commit, + whatever backup option you may want to put in place ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Duplicate status:Needs Triage Applied to new issues that need triage tag:Keyboard Compatibility issues with keyboards, including locale-specific and layout-specific issues
Projects
None yet
Development

No branches or pull requests

3 participants