Skip to content

fix(dashboard): Prevent Enter key from triggering actions during IM…#36540

Open
Theproudcold wants to merge 2 commits intogo-gitea:mainfrom
Theproudcold:main
Open

fix(dashboard): Prevent Enter key from triggering actions during IM…#36540
Theproudcold wants to merge 2 commits intogo-gitea:mainfrom
Theproudcold:main

Conversation

@Theproudcold
Copy link

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.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 6, 2026
@silverwind
Copy link
Member

silverwind commented Feb 6, 2026

Looks ok, thanks.

Not required but would be nice maybe to fix it for all places where we bind the Enter key. A quick search reveals:

web_src/js/components/DashboardRepoList.vue-        case 'Enter':
web_src/js/components/RepoBranchTagSelector.vue:      } else if (e.key === 'Enter') {
web_src/js/components/RepoFileSearch.vue:  } else if (e.key === 'Enter') {
web_src/js/features/common-form.ts:    if (e.key !== 'Enter') return;
web_src/js/features/comp/EditorMarkdown.ts:    } else if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey && !e.altKey) {
web_src/js/features/repo-issue.ts:    if (e.altKey && e.key === 'Enter') {
web_src/js/modules/fomantic/dropdown.ts:    if (e.key === 'Enter') {
web_src/js/webcomponents/overflow-menu.ts:        } else if (e.key === ' ' || e.code === 'Enter') {

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search bar triggers "Enter" event during IME composition (Chinese input)

3 participants