🐛 fix(search): prevent IME composition from triggering navigation (#628)
Some checks failed
Build Site / Check and Build for Pull Requests (push) Has been cancelled
Build Site / Build and Deploy on Main Push (push) Has been cancelled

This commit is contained in:
vinidlidoo 2026-02-24 22:46:44 -08:00 committed by GitHub
parent a01833caca
commit 3896c1597c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -3157,7 +3157,8 @@ window.onload = function () {
if (
['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(
event.key
)
) &&
!event.isComposing
) {
event.preventDefault();
let newIndex = activeDivIndex;
@ -3188,7 +3189,7 @@ window.onload = function () {
}
}
if (event.key === 'Enter' && activeDiv) {
if (event.key === 'Enter' && activeDiv && !event.isComposing) {
event.preventDefault();
event.stopImmediatePropagation();
const anchorTag = activeDiv.querySelector('a');

File diff suppressed because one or more lines are too long