Prevent default otherwise the form will submit and reload the page

pull/1/head
David Baker 2015-06-15 11:00:39 +01:00
parent 4bb570c545
commit 52286b2316
1 changed files with 2 additions and 0 deletions

View File

@ -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', {