Files
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

41 lines
1.4 KiB
JavaScript

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = scrollParent;
var _css = _interopRequireDefault(require("./css"));
var _height = _interopRequireDefault(require("./height"));
var _isDocument = _interopRequireDefault(require("./isDocument"));
/* eslint-disable no-cond-assign, no-continue */
/**
* Find the first scrollable parent of an element.
*
* @param element Starting element
* @param firstPossible Stop at the first scrollable parent, even if it's not currently scrollable
*/
function scrollParent(element, firstPossible) {
var position = (0, _css.default)(element, 'position');
var excludeStatic = position === 'absolute';
var ownerDoc = element.ownerDocument;
if (position === 'fixed') return ownerDoc || document; // @ts-ignore
while ((element = element.parentNode) && !(0, _isDocument.default)(element)) {
var isStatic = excludeStatic && (0, _css.default)(element, 'position') === 'static';
var style = ((0, _css.default)(element, 'overflow') || '') + ((0, _css.default)(element, 'overflow-y') || '') + (0, _css.default)(element, 'overflow-x');
if (isStatic) continue;
if (/(auto|scroll)/.test(style) && (firstPossible || (0, _height.default)(element) < element.scrollHeight)) {
return element;
}
}
return ownerDoc || document;
}
module.exports = exports["default"];