mirror of
https://github.com/welpo/tabi.git
synced 2026-03-10 01:57:20 +01:00
🐛 fix(search): prevent IME composition from triggering navigation (#628)
This commit is contained in:
parent
a01833caca
commit
3896c1597c
2 changed files with 4 additions and 3 deletions
|
|
@ -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');
|
||||
|
|
|
|||
2
static/js/searchElasticlunr.min.js
vendored
2
static/js/searchElasticlunr.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue