Repository navigation
[Scroll anchoring] Enable in stable - #58575
Merged
webkit-commit-queue merged 1 commit intoFeb 13, 2026
Merged
Conversation
Collaborator
|
EWS run on current version of this PR (hash 17ce670) Details |
aprotyas
approved these changes
Feb 13, 2026
nt1m
approved these changes
Feb 13, 2026
https://bugs.webkit.org/show_bug.cgi?id=307734 rdar://170279026 Reviewed by Tim Nguyen and Abrar Rahman Protyasha. Enable scroll anchoring in stable. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Canonical link: https://commits.webkit.org/307475@main
webkit-commit-queue
force-pushed
the
eng/Scroll-anchoring-Enable-in-stable
branch
from
February 13, 2026 15:52
17ce670 to
c4baf2d
Compare
Collaborator
|
Committed 307475@main (c4baf2d): https://commits.webkit.org/307475@main Reviewed commits have been landed. Closing PR #58575 and removing active labels. |
krassowski
added a commit
to jupyterlab/jupyterlab
that referenced
this pull request
Mar 6, 2026
…ull` windowing mode (#18522) ## References - Includes #18504 - Fixes #18470 - Closes #18511 - Closes #18468 Quotes below are @jasongrout's description copied from #18504 > This is a follow up to #18503, which this PR includes. After #18503, the viewport does not shift based on changes happening outside the viewport, but the active cell can still shift when content inside the viewport changes. This PR resolves this issue. > > Addresses #18468 (comment) ## Code changes - drop the custom scrollback implementation for windowing modes other than `full` in favor of native scroll anchoring with better behaviour implemented as: > Make active cells (or descendants thereof) the only elements able to be scroll anchors in the notebook. This means that the browser will not anchor the scroll to an element inside an inactive cell. - increase the timeout used to deactivate the scrollback (acting the same as anchor but in `full` windowing mode) to 3 seconds without motion; we could probably make it infinite but I am not confident enough with the implementation to do so yet; 3 seconds appears to be a reasonable threshold - resolve the promise returned by `scrollToItem` method as soon as scrolling end, not when the timeout used for scrollback method of `full` windowing mode expires - separate the test for anchoring from the test of scrolling cell we advanced to into view; previously a single test was testing both behaviours in a way which was hard to wrap one's head around - improve the reliability of the `positionCellPartiallyBelowViewport` utility which lead to flaky test due to imprecision of mouse wheel operations ## User-facing changes The active cell will be kept in view more reliably, using browser-platform native solution rather than workarounds, fixing some edge cases with scrolling. > In Chrome-based browsers or Firefox, the active cell should not be shifted up or down by other cells changing their size or gaining new output. [...] > > Before: > > https://github.com/user-attachments/assets/67c94546-b131-498c-8b0d-891bfd81cdb8 > > After: > > https://github.com/user-attachments/assets/297e2dff-8190-4c77-8751-869fac6b9892 > > Note that the browser decides that when you are scrolled all the way to the very top, you should stay at the top. The moment you scroll just a bit down, the active cell is then anchored in the viewport. Safari users won't see the benefit until they upgrade to a future version which enables support for `overflow-anchor`. This was recently enabled in Safari Technology Preview v238: - WebKit/WebKit#58575 - https://developer.apple.com/documentation/safari-technology-preview-release-notes/stp-release-238 - https://caniuse.com/?search=overflow-anchor - The earliest non-TP Safari version that could support `overflow-anchor` would likely be 26.5, TBC ## Backwards-incompatible changes None ## AI usage No --------- Co-authored-by: Jason Grout <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 vision-apple
c4baf2d
17ce670