Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@github/hotkey

Package Overview
Dependencies
Maintainers
19
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/hotkey - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

22

dist/index.js

@@ -132,15 +132,15 @@ class Leaf {

if (newTriePosition instanceof Leaf) {
let shouldFire = true;
const elementToFire = newTriePosition.children[newTriePosition.children.length - 1];
const hotkeyScope = elementToFire.getAttribute('data-hotkey-scope');
if (isFormField(event.target)) {
const target = event.target;
if (target.id !== elementToFire.getAttribute('data-hotkey-scope')) {
shouldFire = false;
const target = event.target;
let shouldFire = false;
let elementToFire;
const formField = isFormField(target);
for (let i = newTriePosition.children.length - 1; i >= 0; i -= 1) {
elementToFire = newTriePosition.children[i];
const scope = elementToFire.getAttribute('data-hotkey-scope');
if ((!formField && !scope) || (formField && target.id === scope)) {
shouldFire = true;
break;
}
}
else if (hotkeyScope) {
shouldFire = false;
}
if (shouldFire) {
if (elementToFire && shouldFire) {
fireDeterminedAction(elementToFire);

@@ -147,0 +147,0 @@ event.preventDefault();

{
"name": "@github/hotkey",
"version": "1.5.3",
"version": "1.5.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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