Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Bayheck committed May 27, 2024
1 parent af60354 commit 43f3d46
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/client/core/utils/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ export function hasScroll (el: Element): boolean {

export function getScrollableParents (element: HTMLElement): HTMLElement[] {
let parentsArray = domUtils.getParents(element);
let isElementInIframe;

if (element.ownerDocument !== window.top?.document) {
try {
isElementInIframe = element.ownerDocument !== window.top?.document;
}
catch (e) {
isElementInIframe = null;
}

if (isElementInIframe) {
const iframe = domUtils.getIframeByElement(element);

if (iframe) {
Expand Down

0 comments on commit 43f3d46

Please sign in to comment.