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

@springernature/global-autocomplete

Package Overview
Dependencies
Maintainers
13
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@springernature/global-autocomplete - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

3

HISTORY.md
# History
## 5.0.4 (2021-06-18)
* explorer fixes: event key for Escape, and use .removeChild() instead of .remove()
## 5.0.3 (2021-03-01)

@@ -4,0 +7,0 @@ * Dont focus input when removing suggestion box

10

js/index.js

@@ -34,3 +34,3 @@ const autoComplete = arguments_ => {

const eventKeys = ['ArrowDown', 'Down', 'ArrowUp', 'Up', 'Escape', 'Enter', 'Tab'];
const eventKeys = ['ArrowDown', 'Down', 'ArrowUp', 'Up', 'Escape', 'Esc', 'Enter', 'Tab'];

@@ -60,3 +60,3 @@ let inputTimer = null;

if (container()) {
container().remove();
container().parentNode.removeChild(container());
}

@@ -72,3 +72,3 @@ document.removeEventListener('click', removeSuggestions);

container().addEventListener('keydown', event => {
if (['Escape', 'ArrowUp', 'Up', 'ArrowDown', 'Down'].includes(event.key)) {
if (['Escape', 'Esc', 'ArrowUp', 'Up', 'ArrowDown', 'Down'].includes(event.key)) {
event.preventDefault();

@@ -106,3 +106,3 @@ event.stopPropagation();

}
} else if (event.key === 'Escape') {
} else if (event.key === 'Escape' || event.key === 'Esc') {
removeSuggestions();

@@ -203,3 +203,3 @@ input.value = currentSearchTerm;

if (event.key === 'Escape') {
if (event.key === 'Escape' || event.key === 'Esc') {
removeSuggestions(event);

@@ -206,0 +206,0 @@ }

{
"name": "@springernature/global-autocomplete",
"version": "5.0.3",
"version": "5.0.4",
"license": "MIT",

@@ -14,4 +14,4 @@ "description": "Autocomplete/suggest component",

"scripts": {
"postinstall": "npm_config_registry=https://registry.npmjs.org/ npx @springernature/util-context-warning@0.0.5 -p @springernature/global-autocomplete@5.0.3 -v 4.2.2 4.3.0 4.3.1 4.3.2"
"postinstall": "npm_config_registry=https://registry.npmjs.org/ npx @springernature/util-context-warning@0.0.5 -p @springernature/global-autocomplete@5.0.4 -v 4.2.2 4.3.0 4.3.1 4.3.2"
}
}

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