Avoided forced reload when hitting return on the password generator length field

This commit is contained in:
Giulio Cesare Solaroli 2015-09-23 13:44:57 +02:00
parent 376ccf24e9
commit adf8e186cb

View File

@ -127,6 +127,10 @@ Clipperz.PM.UI.Components.Cards.PasswordGeneratorClass = React.createClass({
}); });
}, },
handleFormSubmit: function (anEvent) {
anEvent.preventDefault();
},
changeStateWithTargetValue: function (aKey, shouldUpdatePasswordValue) { changeStateWithTargetValue: function (aKey, shouldUpdatePasswordValue) {
var self = this; var self = this;
return function (anEvent) { return function (anEvent) {
@ -174,7 +178,7 @@ Clipperz.PM.UI.Components.Cards.PasswordGeneratorClass = React.createClass({
result = React.DOM.div({'className':'passwordGenerator'}, [ result = React.DOM.div({'className':'passwordGenerator'}, [
React.DOM.div({'className':'passwordGeneratorMask', 'onClick':this.props['closeClallback']}), React.DOM.div({'className':'passwordGeneratorMask', 'onClick':this.props['closeClallback']}),
React.DOM.div({'className':'passwordGeneratorBaloon'}, [ React.DOM.div({'className':'passwordGeneratorBaloon'}, [
React.DOM.form({}, [ React.DOM.form({'onSubmit':this.handleFormSubmit}, [
React.DOM.div({'className':'optionsWrapper'}, [ React.DOM.div({'className':'optionsWrapper'}, [
React.DOM.header({}, [ React.DOM.header({}, [
React.DOM.div({'className':'button', 'onClick':this.toggleOptions}, "options") React.DOM.div({'className':'button', 'onClick':this.toggleOptions}, "options")