fix(datetime): wheel picker shows consistently in overlays - #29147
Merged
Conversation
liamdebeasi
marked this pull request as ready for review
March 13, 2024 16:36
liamdebeasi
requested review from
a team and
averyrousseau
and removed request for
a team
March 13, 2024 16:36
averyrousseau
approved these changes
Mar 13, 2024
7 tasks
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.
Issue number: resolves #26234
What is the current behavior?
We use an IntersectionObserver to know when each picker column is visible so we can properly scroll the active option in each column into view. The IO callback passes an array of entries. Up until this PR, we have always grabbed the first entry in the array. The problem is that browsers will sometimes group multiple events into a single array. This means it's possible to have an event with
isIntersecting: falseand then another event withisIntersecting: truein the same callback. Since we always grabbed the first event we did not account for the instances where events were coalesced.This resulted in column options sometimes not scrolling into view when presented via an overlay.
What is the new behavior?
Does this introduce a breaking change?
Other information
Dev build:
7.7.5-dev.11710347256.1954cae9