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

shift-enter not proceeding to next cell #15227

Open
jgunstone opened this issue Oct 5, 2023 · 5 comments
Open

shift-enter not proceeding to next cell #15227

jgunstone opened this issue Oct 5, 2023 · 5 comments
Labels
bug tag:Regression Behavior that had been broken, was fixed, and is broken again
Milestone

Comments

@jgunstone
Copy link

maybe linked:
#14513

Description

the gif shows that when pressing shift-enter the notebook doesn't proceed to the next cell

shift-enter-bug

and then in the end it does... ! (inconsistent behaviour)

Expected behavior

shift-enter always proceeds to the next cell

Context

  • Operating System and version: Linux Ubuntu 20.04
  • chrome Version 117.0.5938.92
  • JupyterLab version:
(ipyautoui-dev) jovyan@PORT4028:~/ipyautoui$ conda list jupyt
# packages in environment at /home/jovyan/mambaforge/envs/ipyautoui-dev:
#
# Name                    Version                   Build  Channel
jupyter-lsp               2.2.0              pyhd8ed1ab_0    conda-forge
jupyter_client            8.1.0            py39h06a4308_0  
jupyter_core              5.3.0            py39h06a4308_0  
jupyter_events            0.6.3            py39h06a4308_0  
jupyter_server            2.5.0            py39h06a4308_0  
jupyter_server_terminals  0.4.4            py39h06a4308_1  
jupyterlab                4.0.6              pyhd8ed1ab_0    conda-forge
jupyterlab-lsp            5.0.0rc1                 pypi_0    pypi
jupyterlab_pygments       0.1.2                      py_0  
jupyterlab_server         2.22.0           py39h06a4308_0  
jupyterlab_widgets        3.0.9              pyhd8ed1ab_0    conda-forge
jupytext                  1.15.2             pyh5da7574_0    conda-forge
@jgunstone jgunstone added the bug label Oct 5, 2023
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Oct 5, 2023
@krassowski krassowski added this to the 4.0.x milestone Oct 5, 2023
@krassowski krassowski added the tag:Regression Behavior that had been broken, was fixed, and is broken again label Oct 5, 2023
@krassowski
Copy link
Member

+1 I see it too. It does not happen too often but when it does it is annoying.

It would be useful to create a small reliably reproducible example. Could you see if you can create something that we could copy-paste and use for testing? Thank you for opening this issue!

@jgunstone
Copy link
Author

hi there,
I've been trying to come up with something...
the problem is as soon as it starts happening, if I copy that code into a different notebook the behaviour changes...
so i think something else must be happening...

i.e.
in 1 notebook, this causes the behaviour described:

from ipywidgets import ToggleButton

ToggleButton()

in another it doesn't.

I'm not sure what triggers the bad behaviour to start happening...

@krassowski
Copy link
Member

I was able to determine at least one cause of failure. When jupyterlab-lsp is enabled it can dispatch updates (linting/highlights) to the editor depending on server responses. If the reply arrives immediately after the active cell was changed, but before the editor deactivation change propagated to CodeMirror editor, CodeMirror6 update will trigger a "focus in" event on the old cell leading to change of active cell via _evtFocusIn handler.

Another mode of failure could be related to search function doing something with focus.

I guess you could try temporarily disabling jupyterlab-lsp to see if it helps.

image

@michaelaye
Copy link

disabling jupyterlab-lsp definitely helped. But that's sad, i need my IDE tools working...

@krassowski
Copy link
Member

@michaelaye feel welcome to contribute to your IDE tools ;) I opened jupyter-lsp/jupyterlab-lsp#1026 on the LSP side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tag:Regression Behavior that had been broken, was fixed, and is broken again
Projects
None yet
Development

No branches or pull requests

4 participants