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
commit 61287a16d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 6 deletions

View File

@ -828,13 +828,19 @@
e.preventDefault();
}
if (e.key === 'Enter' && !e.shiftKey && prompt !== '') {
submitPrompt(prompt, user);
return;
}
const commandOptionButton = [
...document.getElementsByClassName('selected-command-option-button')
]?.at(-1);
if (e.key === 'Enter' && e.shiftKey && prompt !== '') {
return;
if (!commandOptionButton) {
if (e.key === 'Enter' && !e.shiftKey && prompt !== '' && selected) {
submitPrompt(prompt, user);
return;
}
if (e.key === 'Enter' && e.shiftKey && prompt !== '') {
return;
}
}
}