@thisway/utils
Advanced tools
Comparing version 0.10.0-beta.0 to 0.10.0-beta.1
13
index.js
@@ -471,5 +471,14 @@ import { derived } from "svelte/store"; | ||
const hierarchy = buildHierarchy(target); | ||
const elements = hierarchy.filter((el) => checkBoundary(el) && isScrollableElement(el)); | ||
const elements = []; | ||
for (let index = hierarchy.length; index >= 0; index--) { | ||
const element = hierarchy[index]; | ||
if (!checkBoundary(element)) { | ||
break; | ||
} | ||
if (isScrollableElement(element)) { | ||
elements.push(element); | ||
} | ||
} | ||
const iframes = hierarchy.filter(checkElementType("iframe")); | ||
return [elements, iframes]; | ||
return [elements.reverse(), iframes]; | ||
} | ||
@@ -476,0 +485,0 @@ function computeScrollIntoView(target, options) { |
{ | ||
"name": "@thisway/utils", | ||
"version": "0.10.0-beta.0", | ||
"version": "0.10.0-beta.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
44781
1220