You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am encountering an issue with automatic positioning of the datepicker when it's used within a ShadowDOM slot via a web component. The function getScrollableParent returns Window, even though the picker is within a scrolling container element, which results in the scroll event listener being attached to the incorrect element. Consequently, the datepicker does not reposition itself when the actual container element is scrolled.
This issue can be resolved by modifying getScrollableParent to check if the element is assigned to a slot and, if so, to use the slot's parent element instead.
biesbjerg
changed the title
Supported positioning when using ShadowDOM and slotted content
Support auto-positioning when using ShadowDOM and slotted content
Apr 13, 2024
biesbjerg
changed the title
Support auto-positioning when using ShadowDOM and slotted content
Auto-positioning when using ShadowDOM and slotted content
Apr 13, 2024
Describe the bug
I am encountering an issue with automatic positioning of the datepicker when it's used within a ShadowDOM slot via a web component. The function
getScrollableParent
returnsWindow
, even though the picker is within a scrolling container element, which results in the scroll event listener being attached to the incorrect element. Consequently, the datepicker does not reposition itself when the actual container element is scrolled.This issue can be resolved by modifying
getScrollableParent
to check if the element is assigned to a slot and, if so, to use the slot's parent element instead.To Reproduce
Expected behavior
The datepicker should adjust its position in response to scrolling of the containing element.
PR: #829
The text was updated successfully, but these errors were encountered: