Skip to content

Commit 3b2e662

Browse files
authored
Merge pull request #829 from biesbjerg/fix-scollable-parent-shadowdom
Support auto positioning in ShadowDOM
2 parents 57b20e6 + aa5af31 commit 3b2e662

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/VueDatePicker/composables/position.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export const usePosition = ({
225225
const getScrollableParent = function (el: HTMLElement | null): Window | HTMLElement {
226226
if (!el || el === document.body || el.nodeType === Node.DOCUMENT_FRAGMENT_NODE) return window;
227227
if (isScrollable(el)) return el;
228-
return getScrollableParent(el.parentNode as HTMLElement);
228+
return getScrollableParent((el.assignedSlot ? el.assignedSlot.parentNode : el.parentNode) as HTMLElement);
229229
};
230230

231231
const getShadowPos = (rect?: DOMRect) => {

0 commit comments

Comments
 (0)