@springernature/global-autocomplete
Advanced tools
Comparing version 5.0.3 to 5.0.4
# 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 |
@@ -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
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
52047