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

Scroll to the active cell when typing (in edit mode) #15413

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

brichet
Copy link
Contributor

@brichet brichet commented Nov 15, 2023

References

Follow up #14115

#14115 removed the scroll to the active cell on keydown event.
When the notebook is in edit mode and the active cell is not visible, using the keyboard should scroll to the active cell.

This PR restores this behavior, and removes some complexity included in the PR above.

Code changes

  • scroll to the active cell on keydown event on the notebook in edit mode
  • selectAbove() and selectBelow() notebook actions are not asynchronous anymore, which simplifies some tests.

This results in reverting asynchronous methods introduced in #15413

User-facing changes

Scroll to the active cell when typing, as previously.

Backwards-incompatible changes

None

cc @gabalafou @krassowski who worked on the related PR

Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@brichet brichet added the bug label Nov 15, 2023
@brichet brichet changed the title Restore the focus on the active cell when typing Scroll to the active cell when typing (in edit mode) Nov 15, 2023
@brichet
Copy link
Contributor Author

brichet commented Nov 15, 2023

Test failures are not related

@fcollonval fcollonval modified the milestones: 4.0.x, 4.1.0 Nov 17, 2023
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @brichet

@fcollonval
Copy link
Member

Merging as the test will pass (the last commit is only adding a code comment)

@fcollonval fcollonval merged commit b346ac3 into jupyterlab:main Nov 20, 2023
71 of 77 checks passed
@fcollonval fcollonval deleted the focus-on-keydown branch November 20, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants