Socket
Socket
Sign inDemoInstall

@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.4.4 to 1.5.0

28

dist/index.js

@@ -112,4 +112,11 @@ class Leaf {

return;
if (event.target instanceof Node && isFormField(event.target))
if (!(event.target instanceof Node))
return;
if (isFormField(event.target)) {
const target = event.target;
if (!target.id)
return;
if (!target.ownerDocument.querySelector(`[data-hotkey-scope=${target.id}]`))
return;
}
if (resetTriePositionTimer != null) {

@@ -126,6 +133,19 @@ window.clearTimeout(resetTriePositionTimer);

if (newTriePosition instanceof Leaf) {
fireDeterminedAction(newTriePosition.children[newTriePosition.children.length - 1]);
event.preventDefault();
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;
}
}
else if (hotkeyScope) {
shouldFire = false;
}
if (shouldFire) {
fireDeterminedAction(elementToFire);
event.preventDefault();
}
resetTriePosition();
return;
}

@@ -132,0 +152,0 @@ }

2

package.json
{
"name": "@github/hotkey",
"version": "1.4.4",
"version": "1.5.0",
"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