mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-16 16:01:02 +09:00
Prevent navigation keys from triggering actions during IME composition (#36540)
Fixes #36532 Refined the Enter key trigger logic in the repository filter to prevent actions during IME composition. By checking the e.isComposing property, the filter now correctly distinguishes between "confirming an IME candidate" and "submitting the search." This prevents premature search triggers when users press Enter to select Chinese/Japanese characters. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -22,6 +22,7 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
|
||||
const div = document.createElement('div');
|
||||
div.tabIndex = -1; // for initial focus, programmatic focus only
|
||||
div.addEventListener('keydown', (e) => {
|
||||
if (e.isComposing) return;
|
||||
if (e.key === 'Tab') {
|
||||
const items = this.tippyContent.querySelectorAll<HTMLElement>('[role="menuitem"]');
|
||||
if (e.shiftKey) {
|
||||
|
||||
Reference in New Issue
Block a user