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
Page up/page down partially scrolls notebook back #15594
Comments
Because windowed notebooks are not the default in 4.1.0, this bug, while noticeable and annoying, should not block a 4.1.0 release. |
Note: in |
When the active cell is scrolled out of view pressing any key, including Alt and PgUp/PgDown (which do not generate keystrokes) causes the viewport to scroll back to the active cell. This might be the root issue. |
Which comes about because the notebook widget handler forces focus on the active cell on keydown event: jupyterlab/packages/notebook/src/widget.ts Lines 1948 to 1950 in 4df55ca
I think the solution is to filter the keydown events to these which cause (a) cursor movement (b) input (c) selection change. |
This is interesting, so jupyterlab/packages/notebook/src/widget.ts Lines 2212 to 2217 in 4df55ca
jupyterlab/packages/cells/src/widget.ts Lines 240 to 251 in 4df55ca
which gets set when windowing is active: jupyterlab/packages/notebook/src/windowing.ts Line 238 in 4df55ca
It might be that we do not need to call Edit: By attempting to remove |
It feels like we should rely on the internal heuristics of CodeMirror to decide when to scroll. These unfortunately are not exposed via a public API and just invoke a very clever scroll implementation, which however cannot succeed when in a virtualized list as it does not know about the offset which is hidden. I opened codemirror/dev#1355 to ask if a public entrypoint could be added but it may be a big ask. |
Description
Pressing Pg up/pg down in a cell scrolls notebook in unexpected way.
Reproduce
Expected behavior
Scrolling in full windowing mode behaves predictably.
Context
The text was updated successfully, but these errors were encountered: