mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-22 17:00:14 +08:00
fix(Inputbar): fix enter key confict (#7679)
fix(Inputbar): prevent default behavior for Enter key when quick panel is visible
This commit is contained in:
parent
21ba35b6bf
commit
db4ce9fb7f
@ -348,8 +348,9 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
//other keys should be ignored
|
||||
const isEnterPressed = event.key === 'Enter' && !event.nativeEvent.isComposing
|
||||
if (isEnterPressed) {
|
||||
if (isSendMessageKeyPressed(event, sendMessageShortcut)) {
|
||||
if (quickPanel.isVisible) return event.preventDefault()
|
||||
|
||||
if (isSendMessageKeyPressed(event, sendMessageShortcut)) {
|
||||
sendMessage()
|
||||
return event.preventDefault()
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user