From 52286b2316b98290949f4fc101ab29d31b0bea75 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 15 Jun 2015 11:00:39 +0100 Subject: [PATCH] Prevent default otherwise the form will submit and reload the page --- src/templates/Login.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/templates/Login.js b/src/templates/Login.js index 62c09ace7f..34159f631c 100644 --- a/src/templates/Login.js +++ b/src/templates/Login.js @@ -21,6 +21,7 @@ module.exports = React.createClass({ }, onHSChosen: function(ev) { + ev.preventDefault(); MatrixClientPeg.replaceUsingUrl(this.refs.serverConfig.getHsUrl()); this.setState({hs_url: this.refs.serverConfig.getHsUrl()}); this.setStep("fetch_stages"); @@ -41,6 +42,7 @@ module.exports = React.createClass({ }, onUserPassEntered: function(ev) { + ev.preventDefault(); this.setState({busy: true}); var that = this; MatrixClientPeg.get().login('m.login.password', {