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

This commit is contained in:
Phantom 2025-10-26 17:45:31 +08:00 committed by GitHub
parent d8f1a68e87
commit f5a1d3f8d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,7 +88,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') {