Socket
Socket
Sign inDemoInstall

@floating-ui/utils

Package Overview
Dependencies
0
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

7

dom/dist/floating-ui.utils.dom.esm.js

@@ -111,3 +111,3 @@ function getNodeName(node) {

}
function getOverflowAncestors(node, list) {
function getOverflowAncestors(node, list, traverseIframes) {
var _node$ownerDocument2;

@@ -117,2 +117,5 @@ if (list === void 0) {

}
if (traverseIframes === void 0) {
traverseIframes = true;
}
const scrollableAncestor = getNearestOverflowAncestor(node);

@@ -122,3 +125,3 @@ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);

if (isBody) {
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement ? getOverflowAncestors(win.frameElement) : []);
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
}

@@ -125,0 +128,0 @@ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));

@@ -117,3 +117,3 @@ (function (global, factory) {

}
function getOverflowAncestors(node, list) {
function getOverflowAncestors(node, list, traverseIframes) {
var _node$ownerDocument2;

@@ -123,2 +123,5 @@ if (list === void 0) {

}
if (traverseIframes === void 0) {
traverseIframes = true;
}
const scrollableAncestor = getNearestOverflowAncestor(node);

@@ -128,3 +131,3 @@ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);

if (isBody) {
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement ? getOverflowAncestors(win.frameElement) : []);
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
}

@@ -131,0 +134,0 @@ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));

@@ -22,3 +22,3 @@ type OverflowAncestors = Array<Element | Window | VisualViewport>;

export declare function getNearestOverflowAncestor(node: Node): HTMLElement;
export declare function getOverflowAncestors(node: Node, list?: OverflowAncestors): OverflowAncestors;
export declare function getOverflowAncestors(node: Node, list?: OverflowAncestors, traverseIframes?: boolean): OverflowAncestors;
export {};
{
"name": "@floating-ui/utils",
"version": "0.1.2",
"version": "0.1.3",
"description": "Utilities for Floating UI",

@@ -5,0 +5,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc