fix(hooks): prevent save on composing enter key in useInPlaceEdit (#10972)

(cherry picked from commit f5a1d3f8d0)
This commit is contained in:
Phantom 2025-10-26 17:45:31 +08:00 committed by dev
parent 36b67c6917
commit 261cfab2f0

View File

@ -70,7 +70,7 @@ export function useInPlaceEdit(options: UseInPlaceEditOptions): UseInPlaceEditRe
const handleKeyDown = useCallback(
(e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
if (e.key === 'Enter' && !e.nativeEvent.isComposing) {
e.preventDefault()
saveEdit()
} else if (e.key === 'Escape') {