fix: enter key behavior conflict with IME in search box (#3454)

pull/3386/merge
Yuta Nakamura 10 months ago committed by GitHub
parent 367c6035b7
commit cd8ee6fb32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -322,6 +322,8 @@ onKeyStroke('ArrowDown', (event) => {
const router = useRouter() const router = useRouter()
onKeyStroke('Enter', (e) => { onKeyStroke('Enter', (e) => {
if (e.isComposing) return
if (e.target instanceof HTMLButtonElement && e.target.type !== 'submit') if (e.target instanceof HTMLButtonElement && e.target.type !== 'submit')
return return

Loading…
Cancel
Save