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

motion-dom

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

motion-dom - npm Package Compare versions

Comparing version 11.16.0 to 11.16.1

63

dist/cjs/index.js

@@ -380,2 +380,21 @@ 'use strict';

/**
* Recursively traverse up the tree to check whether the provided child node
* is the parent or a descendant of it.
*
* @param parent - Element to find
* @param child - Element to test against parent
*/
const isNodeOrChild = (parent, child) => {
if (!child) {
return false;
}
else if (parent === child) {
return true;
}
else {
return isNodeOrChild(parent, child.parentElement);
}
};
const isPrimaryPointer = (event) => {

@@ -398,2 +417,13 @@ if (event.pointerType === "mouse") {

const focusableElements = new Set([
"BUTTON",
"INPUT",
"SELECT",
"TEXTAREA",
"A",
]);
function isElementKeyboardAccessible(element) {
return focusableElements.has(element.tagName) || element.tabIndex !== -1;
}
const isPressing = new WeakSet();

@@ -436,33 +466,3 @@

const focusableElements = new Set([
"BUTTON",
"INPUT",
"SELECT",
"TEXTAREA",
"A",
]);
function isElementKeyboardAccessible(element) {
return focusableElements.has(element.tagName) || element.tabIndex !== -1;
}
/**
* Recursively traverse up the tree to check whether the provided child node
* is the parent or a descendant of it.
*
* @param parent - Element to find
* @param child - Element to test against parent
*/
const isNodeOrChild = (parent, child) => {
if (!child) {
return false;
}
else if (parent === child) {
return true;
}
else {
return isNodeOrChild(parent, child.parentElement);
}
};
/**
* Filter out events that are not primary pointer events, or are triggering

@@ -523,3 +523,4 @@ * while a Motion gesture is active.

elements.forEach((element) => {
if (!isElementKeyboardAccessible(element)) {
if (!isElementKeyboardAccessible(element) &&
element.getAttribute("tabindex") === null) {
element.tabIndex = 0;

@@ -526,0 +527,0 @@ }

{
"name": "motion-dom",
"version": "11.16.0",
"version": "11.16.1",
"author": "Matt Perry",

@@ -26,3 +26,3 @@ "license": "MIT",

},
"gitHead": "0d6f15819d66d9e76f3b32bc79ceb001079da43e"
"gitHead": "d0d281ab97fe3ceef4d582d8da622faab907998d"
}

Sorry, the diff of this file is not supported yet

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