From ef7047d45db82ceb3d12a040b900377caa5e4f00 Mon Sep 17 00:00:00 2001 From: zloy_linux Date: Sun, 22 Mar 2026 12:45:53 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(search):=20prevent=20IME=20c?= =?UTF-8?q?omposition=20from=20triggering=20navigation=20(#628)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/tabi/static/js/searchElasticlunr.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/themes/tabi/static/js/searchElasticlunr.js b/themes/tabi/static/js/searchElasticlunr.js index 9ad09e1..b496af9 100644 --- a/themes/tabi/static/js/searchElasticlunr.js +++ b/themes/tabi/static/js/searchElasticlunr.js @@ -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');