Merge pull request #2752 from open-webui/dev

fix: #2751
This commit is contained in:
Timothy Jaeryang Baek
2024-06-02 22:29:16 -07:00
committed by GitHub

View File

@@ -828,7 +828,12 @@
e.preventDefault(); e.preventDefault();
} }
if (e.key === 'Enter' && !e.shiftKey && prompt !== '') { const commandOptionButton = [
...document.getElementsByClassName('selected-command-option-button')
]?.at(-1);
if (!commandOptionButton) {
if (e.key === 'Enter' && !e.shiftKey && prompt !== '' && selected) {
submitPrompt(prompt, user); submitPrompt(prompt, user);
return; return;
} }
@@ -837,6 +842,7 @@
return; return;
} }
} }
}
const isCtrlPressed = e.ctrlKey || e.metaKey; // metaKey is for Cmd key on Mac const isCtrlPressed = e.ctrlKey || e.metaKey; // metaKey is for Cmd key on Mac