mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 19:17:56 -05:00
fix: Enter or Escape while typing with an IME saves, submits or closes too early (#35295)
When typing Japanese, Chinese or Korean with an input method (IME), Enter, Space and the arrow keys pick conversion candidates and Escape drops them. Many inputs treated those keys as their own: Escape stopped a running response, threw away a message, cell, rename or comment draft, cleared a search or closed the dialog, drawer, menu or model selector, and Enter or Space saved, submitted, searched, picked a model or added the text while it was still half-typed. Inputs, dialogs and menus that act on these keys now leave keys that belong to the IME alone, the same way chat rename already does. Fixes #35294
This commit is contained in:
1 parent
da69677528
commit
571e4e3b52
43 files changed
+51
-1
No files matched your search
@@ -138,6 +138,7 @@
|
||||
on:click|stopPropagation
|
||||
on:keydown={(event) => {
|
||||
event.stopPropagation();
|
||||
if (event.isComposing || event.keyCode === 229) return;
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
rename();
|
||||
|
||||
@@ -401,6 +401,7 @@
|
||||
placeholder={$i18n.t('Folder name')}
|
||||
class="h-4 w-full min-w-0 bg-transparent p-0 text-xs leading-4 outline-none"
|
||||
on:keydown={(event) => {
|
||||
if (event.isComposing || event.keyCode === 229) return;
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
submitDirectory();
|
||||
|
||||
Reference in new issue
Block a user