diff --git a/README.md b/README.md index c6e9cce..84a4dbf 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Radar.initialize('prj_test_pk_...', { /* options */ }); Add the following script in your `html` file ```html - + ``` Then initialize the Radar SDK @@ -73,8 +73,8 @@ To create a map, first initialize the Radar SDK with your publishable key. Then ```html
- - + + @@ -98,8 +98,8 @@ To create an autocomplete input, first initialize the Radar SDK with your publis ```html - - + + @@ -130,8 +130,8 @@ To power [geofencing](https://radar.com/documentation/geofencing/overview) exper ```html - - + + diff --git a/package-lock.json b/package-lock.json index 90e2c9b..3a7fd1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "radar-sdk-js", - "version": "4.3.1-beta.0", + "version": "4.3.1-beta.1", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index f41a5c5..01ee691 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "radar-sdk-js", - "version": "4.3.1-beta.0", + "version": "4.3.1-beta.1", "description": "Web Javascript SDK for Radar, location infrastructure for mobile and web apps.", "homepage": "https://radar.com", "type": "module", diff --git a/src/ui/autocomplete.ts b/src/ui/autocomplete.ts index 26fd869..2b20497 100644 --- a/src/ui/autocomplete.ts +++ b/src/ui/autocomplete.ts @@ -395,39 +395,34 @@ class AutocompleteUI { } public handleKeyboardNavigation(event: KeyboardEvent) { - // fallback to deprecated "keyCode" if event.code not set - const code = event.code !== undefined ? event.code : event.keyCode; + const key = event.key; // allow event to propagate if result list is not open if (!this.isOpen) { return; } - switch (code) { + switch (key) { // Next item case 'Tab': case 'ArrowDown': - case 40: event.preventDefault(); this.goTo(this.highlightedIndex + 1); break; // Prev item case 'ArrowUp': - case 38: event.preventDefault(); this.goTo(this.highlightedIndex - 1); break; // Select case 'Enter': - case 13: this.select(this.highlightedIndex); break; // Close case 'Esc': - case 27: this.close(); break; } diff --git a/src/version.ts b/src/version.ts index d0ff53d..5ee20e6 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export default '4.3.1-beta.0'; +export default '4.3.1-beta.1';