I have the following code, which worked perfectly prior to upgrading from React 16.12.0 to React 17.0.0, but now my events no longer fire (i.e. the console.log statement is never printed).
class MyClass extends PureComponent {
handleSubmit = () => {
console.log('Submitted!');
};
render() {
return (
<div className='reveal' id='dialog'>
<form onSubmit={this.handleSubmit}>
<button type='submit'>Submit</button>
</form>
</div>
);
}
}
I've tried changing my code to the following instead, but this event does not fire either.
class MyClass extends PureComponent {
handleSubmit = () => {
console.log('Submitted!');
};
render() {
return (
<div className='reveal' id='dialog'>
<form>
<button onClick={this.handleSubmit} type='submit'>Submit</button>
</form>
</div>
);
}
}
I know this has something to do with the fact that the form is inside a Zurb Foundation "Reveal" dialog, but I have no idea why this problem only occurs when upgrading to React 17.