fix(ui): use scroll:'manual' in intercept to honor rmx-reset-scroll=false - #11644
Draft
okxint wants to merge 1 commit into
Draft
fix(ui): use scroll:'manual' in intercept to honor rmx-reset-scroll=false#11644okxint wants to merge 1 commit into
okxint wants to merge 1 commit into
Conversation
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.
rmx-reset-scroll="false"has no effect. Even thoughstate.resetScrollis correctly parsed tofalse, the page still scrolls to the top on navigation.Root cause:
event.intercept()defaults toscroll: 'after-transition', which tells the browser to automatically scroll to the top after the handler promise resolves — regardless of any manual scroll calls inside the handler. The guard onstate.resetScrollonly suppresses the manualwindow.scrollTo(0, 0)call; the browser's built-in automatic scroll runs unconditionally.Fix: Pass
scroll: 'manual'toevent.intercept(). This delegates all scroll responsibility to the handler, which already has the correctif (state.resetScroll && isNewEntry)guard in place.No other changes needed — the existing manual scroll logic was already correct; it just wasn't the only scroll source.
Fixes #11617