mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-25 06:47:37 -05:00
fix: Enter does nothing in the chat input after selecting all text (#34760)
After selecting everything in the chat input with Ctrl+A or Cmd+A, pressing Enter did nothing. The message was not sent, and the browser console showed a RangeError. Enter now sends the message as usual, and Shift+Enter no longer logs that error. Fixes #34758
This commit is contained in:
1 parent
b7ce1bd194
commit
e861fde7cd
1 file changed
+2
-2
@@ -1339,8 +1339,8 @@
|
||||
|
||||
const { state } = view;
|
||||
const { $from } = state.selection;
|
||||
const lineStart = $from.before($from.depth);
|
||||
const lineEnd = $from.after($from.depth);
|
||||
const lineStart = $from.start();
|
||||
const lineEnd = $from.end();
|
||||
const lineText = state.doc.textBetween(lineStart, lineEnd, '\n', '\0').trim();
|
||||
if (event.shiftKey && !isCtrlPressed) {
|
||||
if (lineText.startsWith('```')) {
|
||||
|
||||
Reference in new issue
Block a user