fix: Chinese input issue in AddProviderPopup (#6445)

This commit is contained in:
iola1999 2025-05-26 09:46:31 +08:00 committed by GitHub
parent ee78dbd27e
commit 6d61bcd605
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,7 +180,11 @@ const PopupContainer: React.FC<Props> = ({ provider, resolve }) => {
value={name}
onChange={(e) => setName(e.target.value.trim())}
placeholder={t('settings.provider.add.name.placeholder')}
onKeyDown={(e) => e.key === 'Enter' && onOk()}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.nativeEvent.isComposing) {
onOk()
}
}}
maxLength={32}
/>
</Form.Item>