Merge branch 'next' of https://github.com/francoischalifour/autocomplete.js into next
This commit is contained in:
commit
41e00c1985
3 changed files with 9 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@docsearch/react",
|
||||
"version": "1.0.0-alpha.19",
|
||||
"version": "1.0.0-alpha.20",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/algolia/autocomplete.js",
|
||||
"repository": "algolia/autocomplete.js",
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
"watch": "concurrently \"yarn build:esm:watch\" \"yarn build:types:watch\" \"yarn build:css:watch\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@francoischalifour/autocomplete-core": "^1.0.0-alpha.19",
|
||||
"@francoischalifour/autocomplete-preset-algolia": "^1.0.0-alpha.19",
|
||||
"@francoischalifour/autocomplete-core": "^1.0.0-alpha.20",
|
||||
"@francoischalifour/autocomplete-preset-algolia": "^1.0.0-alpha.20",
|
||||
"algoliasearch": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@ export function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose }) {
|
|||
function onKeyDown(event: KeyboardEvent) {
|
||||
if (
|
||||
(event.keyCode === 27 && isOpen) ||
|
||||
(event.key === 'k' && (event.metaKey || event.ctrlKey))
|
||||
// The `Cmd+K` shortcut both opens and closes the modal.
|
||||
(event.key === 'k' && (event.metaKey || event.ctrlKey)) ||
|
||||
// The `/` shortcut opens but doesn't close the modal because it's
|
||||
// a character.
|
||||
(event.key === '/' && !isOpen)
|
||||
) {
|
||||
event.preventDefault();
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export const version = '1.0.0-alpha.19';
|
||||
export const version = '1.0.0-alpha.20';
|
||||
|
|
|
|||
Loading…
Reference in a new issue