Closed SherylHohman closed 6 years ago
https://github.com/erikras/redux-form/issues/2679#issuecomment-286153902: (note: added a space to html tags, so they would render as text/code instead of computing it's html value)
That's pretty strange. My guess is that you have:
'''< button onClick={this.handleCancel}>Cancel< /button>''' and it should be
'''< button type="button" onClick={this.handleCancel}>Cancel< /button>''' ^^^^^^^^^^^^^ I think that most browsers default a to be a submit button, so you are both trying to submit the form and navigate away.
Another option is to call
evt.preventDefault()
in yourhandleCancel()
function.
Occurs when click