GAUD-10291 - Fix issue where focusing the divider causes a page scroll#7221
Merged
svanherk merged 6 commits intoJul 15, 2026
Merged
Conversation
Contributor
|
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
svanherk
commented
Jul 14, 2026
| } | ||
| .horizontal-fields { | ||
| display: flex; | ||
| flex-wrap: wrap; |
Contributor
Author
There was a problem hiding this comment.
Unrelated, but was driving me crazy
| it('calculates aria values correctly', async() => { | ||
| const elem = await fixture(html`<d2l-page-divider-internal label="Resize" min-size="100" max-size="200" current-size="150"></d2l-page-divider-internal>`); | ||
| const slider = elem.shadowRoot.querySelector('.divider'); | ||
| const slider = getSlider(elem); |
Contributor
Author
There was a problem hiding this comment.
Made this function so the update in this PR would be cleaner, and then forgot to use it 🤦♀️
| .slider { | ||
| outline: none; | ||
| position: absolute; | ||
| top: 55px; |
Contributor
Author
There was a problem hiding this comment.
This will be (or will wrap) the collapse button, but just adding the minimum pieces right now to get the defect fixed and the vdiffs in place to protect from regressions.
svanherk
marked this pull request as ready for review
July 14, 2026 23:14
dlockhart
reviewed
Jul 15, 2026
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
dlockhart
approved these changes
Jul 15, 2026
svanherk
deleted the
GAUD-10291-Fix-tabbing-to-divider-causes-page-scroll
branch
July 15, 2026 18:21
|
🎉 This PR is included in version 3.271.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
You can check the current demo page and see that when you tab to the divider, the page scrolls the header away. Fixing this by adding the very beginnings of the collapse button, and having the focus go to that (which is always in the viewport, so no scroll happens).
While fixing this, I broke the opposite (causing it to scroll back to the top if already scrolled), so also added a few vdiffs for that case. Confirmed they were broken when added, and fixed by the finally commit.
vdiff report here. You'll see that the existing tests no longer scroll, and the new ones stayed scrolled.