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 bf8f49f87e
commit 2770edf349

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>