mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 06:15:23 +00:00
refac
This commit is contained in:
parent
596298fa46
commit
a27a095884
1 changed files with 2 additions and 1 deletions
|
|
@ -301,7 +301,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
if (event.shiftKey) {
|
const isCtrlPressed = event.ctrlKey || event.metaKey; // metaKey is for Cmd key on Mac
|
||||||
|
if (event.shiftKey && !isCtrlPressed) {
|
||||||
editor.commands.setHardBreak(); // Insert a hard break
|
editor.commands.setHardBreak(); // Insert a hard break
|
||||||
view.dispatch(view.state.tr.scrollIntoView()); // Move viewport to the cursor
|
view.dispatch(view.state.tr.scrollIntoView()); // Move viewport to the cursor
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue