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