Socket
Socket
Sign inDemoInstall

@github/hotkey

Package Overview
Dependencies
Maintainers
14
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.1.2 to 1.1.3

13

dist/index.esm.js

@@ -217,3 +217,3 @@ function _classCallCheck(instance, Constructor) {

document.addEventListener('keydown', function (event) {
function keyDownHandler(event) {
if (event.target instanceof Node && isFormField(event.target)) return;

@@ -243,4 +243,9 @@

}
});
}
function install(element, hotkey$$1) {
// Install the keydown handler if this is the first install
if (Object.keys(hotkeyRadixTrie.children).length === 0) {
document.addEventListener('keydown', keyDownHandler);
}
var hotkeys = expandHotkeyToEdges(hotkey$$1 || element.getAttribute('data-hotkey') || '');

@@ -280,4 +285,8 @@ var leaves = hotkeys.map(function (hotkey$$1) {

}
if (Object.keys(hotkeyRadixTrie.children).length === 0) {
document.removeEventListener('keydown', keyDownHandler);
}
}
export { RadixTrie, Leaf, hotkey as eventToHotkeyString, install, uninstall };

@@ -223,3 +223,3 @@ (function (global, factory) {

document.addEventListener('keydown', function (event) {
function keyDownHandler(event) {
if (event.target instanceof Node && isFormField(event.target)) return;

@@ -249,4 +249,9 @@

}
});
}
function install(element, hotkey$$1) {
// Install the keydown handler if this is the first install
if (Object.keys(hotkeyRadixTrie.children).length === 0) {
document.addEventListener('keydown', keyDownHandler);
}
var hotkeys = expandHotkeyToEdges(hotkey$$1 || element.getAttribute('data-hotkey') || '');

@@ -286,2 +291,6 @@ var leaves = hotkeys.map(function (hotkey$$1) {

}
if (Object.keys(hotkeyRadixTrie.children).length === 0) {
document.removeEventListener('keydown', keyDownHandler);
}
}

@@ -288,0 +297,0 @@

2

package.json
{
"name": "@github/hotkey",
"version": "1.1.2",
"version": "1.1.3",
"description": "",

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

@@ -64,2 +64,3 @@ # Hotkey Behavior

// Install all the hotkeys on the page
for (const el of document.querySelectorAll('[data-hotkey]')) {

@@ -66,0 +67,0 @@ install(el)

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