mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 14:41:24 +08:00
fix: check isComposing on keydown (#5848)
This commit is contained in:
parent
138ab1c5b7
commit
2193a665c6
@ -267,11 +267,7 @@ const PopupContainer: React.FC<Props> = ({ model, resolve }) => {
|
||||
// 处理键盘导航
|
||||
const handleKeyDown = useCallback(
|
||||
(e: KeyboardEvent) => {
|
||||
if (!open) return
|
||||
|
||||
if (modelItems.length === 0) {
|
||||
return
|
||||
}
|
||||
if (!open || modelItems.length === 0 || e.isComposing) return
|
||||
|
||||
// 键盘操作时禁用鼠标 hover
|
||||
if (['ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Enter', 'Escape'].includes(e.key)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user