We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49b2f96 commit 4e0ff09Copy full SHA for 4e0ff09
src/VueDatePicker/composables/position.ts
@@ -233,7 +233,8 @@ export const usePosition = ({
233
const getScrollableParent = function (el: HTMLElement | null): Window | HTMLElement {
234
if (!el || el === document.body || el.nodeType === Node.DOCUMENT_FRAGMENT_NODE) return window;
235
if (isScrollable(el)) return el;
236
- return getScrollableParent((el.assignedSlot ? el.assignedSlot.parentNode : el.parentNode) as HTMLElement);
+ const parent = defaultedConfig.value.shadowDom ? 'parentNode' : 'parentElement';
237
+ return getScrollableParent((el.assignedSlot ? el.assignedSlot[parent] : el[parent]) as HTMLElement);
238
};
239
240
const getShadowPos = (rect?: DOMRect) => {
0 commit comments