We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 15a7571 + 7eb3dea commit 0817730Copy full SHA for 0817730
src/_assets/components/alpine/Search/Search.js
@@ -3,8 +3,8 @@ export default () => {
3
isOpen: false,
4
metaKey: navigator.platform.indexOf('Mac') === 0 ? '⌘' : 'Ctrl+',
5
onKeyDown(e) {
6
- if (e.key === '/') return this.open();
7
- if (e.key === 'k' && (e.ctrlKey || e.metaKey)) {
+ if (e.key === '/' || (e.key === 'k' && (e.ctrlKey || e.metaKey))) {
+ e.preventDefault();
8
this.open();
9
}
10
},
0 commit comments