-
Notifications
You must be signed in to change notification settings - Fork 79
fix(input-date-picker): Correctly position open component when scrolling #6815
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
Changes from all commits
3fbe8ed
e4ffcd5
37cbb97
e1c5cfd
c73288b
23b9388
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -716,7 +716,7 @@ export class InputDatePicker | |
? endWrapper || startWrapper | ||
: startWrapper || endWrapper; | ||
|
||
connectFloatingUI(this, this.referenceEl, this.floatingEl); | ||
requestAnimationFrame(() => connectFloatingUI(this, this.referenceEl, this.floatingEl)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to wait for next frame to connect floating UI because some rendering is still going on. The rendering needs to happen first before trying to get all scrollable parents. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. On a related note, I was thinking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah I think that makes sense since popover has a role of "dialog" and those two components seem to open dialogs. For things like combobox using the popover, we would need to be able to modify the role. |
||
} | ||
|
||
private valueAsDateChangedExternally = false; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Could you try using
commonTests#floatingUIOwner
? It should cover scrolling updates.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test already has a floatingUIOwner test. Maybe it should be updated to test with
overlay-positioning="fixed"
as well?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried this and it passed so its not catching the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I think the helper might need some tweaking. Can you create a follow-up issue for me? Let's proceed with the existing test here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created: #6838