Skip to content

Commit

Permalink
Ignore Enter key when converting text (for Japanese characters)
Browse files Browse the repository at this point in the history
  • Loading branch information
smori1983 committed Nov 28, 2021
1 parent 610de90 commit 11afc95
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions components/SearchBox.vue
@@ -1,20 +1,21 @@
<template>
<div class="search-box">
<input
ref="input"
aria-label="Search"
:value="query"
:class="{ focused: focused }"
:placeholder="placeholder"
autocomplete="off"
spellcheck="false"
@input="query = $event.target.value"
@focus="focused = true"
@blur="focused = false"
@keyup.enter="go(focusIndex)"
@keyup.up="onUp"
@keyup.down="onDown"
/>
<form @submit.prevent="go(focusIndex)">
<input
ref="input"
aria-label="Search"
:value="query"
:class="{ focused: focused }"
:placeholder="placeholder"
autocomplete="off"
spellcheck="false"
@input="query = $event.target.value"
@focus="focused = true"
@blur="focused = false"
@keyup.up="onUp"
@keyup.down="onDown"
/>
</form>
<ul v-if="showSuggestions" class="suggestions" :class="{ 'align-right': alignRight }" @mouseleave="unfocus">
<li
v-for="(s, i) in suggestions"
Expand Down

0 comments on commit 11afc95

Please sign in to comment.