From 07f1209bbe7dbc950f37488a9ddb5853ff52e718 Mon Sep 17 00:00:00 2001 From: Zhoujingsai Date: Mon, 18 Feb 2019 11:13:22 +0800 Subject: [PATCH] Fix: onPressEnter trigger twice login request in IE11 --- src/pages/User/Login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/User/Login.js b/src/pages/User/Login.js index 54dd5c40..1987c639 100644 --- a/src/pages/User/Login.js +++ b/src/pages/User/Login.js @@ -100,7 +100,7 @@ class LoginPage extends Component { message: formatMessage({ id: 'validation.password.required' }), }, ]} - onPressEnter={() => this.loginForm.validateFields(this.handleSubmit)} + onPressEnter={(e) => {e.preventDefault();this.loginForm.validateFields(this.handleSubmit)}} /> -- GitLab