We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e0ff09 commit 71257b3Copy full SHA for 71257b3
src/VueDatePicker/composables/position.ts
@@ -233,8 +233,11 @@ 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
- const parent = defaultedConfig.value.shadowDom ? 'parentNode' : 'parentElement';
237
- return getScrollableParent((el.assignedSlot ? el.assignedSlot[parent] : el[parent]) as HTMLElement);
+ return getScrollableParent(
+ (el.assignedSlot && defaultedConfig.value.shadowDom
238
+ ? el.assignedSlot.parentNode
239
+ : el.parentNode) as HTMLElement,
240
+ );
241
};
242
243
const getShadowPos = (rect?: DOMRect) => {
0 commit comments