New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

makeup-active-descendant

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makeup-active-descendant - npm Package Compare versions

Comparing version 0.7.4 to 0.7.5

9

dist/cjs/index.js

@@ -20,2 +20,6 @@ "use strict";

};
function isElementInView(el) {
const bounding = el.getBoundingClientRect();
return bounding.top >= 0 && bounding.left >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) && bounding.right <= (window.innerWidth || document.documentElement.clientWidth);
}
function onModelInit(e) {

@@ -48,5 +52,6 @@ const {

this._focusEl.setAttribute("aria-activedescendant", toItem.id);
if (this._options.autoScroll && this._itemContainerEl) {
if (this._options.autoScroll && this._itemContainerEl && !isElementInView(toItem)) {
toItem.scrollIntoView({
block: "center"
behavior: "smooth",
block: "nearest"
});

@@ -53,0 +58,0 @@ }

@@ -11,2 +11,6 @@ import * as NavigationEmitter from "makeup-navigation-emitter";

};
function isElementInView(el) {
const bounding = el.getBoundingClientRect();
return bounding.top >= 0 && bounding.left >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) && bounding.right <= (window.innerWidth || document.documentElement.clientWidth);
}
function onModelInit(e) {

@@ -31,4 +35,4 @@ const { items, toIndex } = e.detail;

this._focusEl.setAttribute("aria-activedescendant", toItem.id);
if (this._options.autoScroll && this._itemContainerEl) {
toItem.scrollIntoView({ block: "center" });
if (this._options.autoScroll && this._itemContainerEl && !isElementInView(toItem)) {
toItem.scrollIntoView({ behavior: "smooth", block: "nearest" });
}

@@ -35,0 +39,0 @@ }

{
"name": "makeup-active-descendant",
"description": "Implements ARIA active descendant keyboard navigation",
"version": "0.7.4",
"version": "0.7.5",
"main": "./dist/cjs/index.js",

@@ -41,3 +41,3 @@ "module": "./dist/mjs/index.js",

],
"gitHead": "72b3adbcb4d841dbd4ad8e722637b3d7de3ab7f0"
"gitHead": "66ba8f5998b1d9364dc4c8cc56663e8e517ed289"
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc