Fix modal popup timeout

parent f96413d1
......@@ -72,13 +72,20 @@ class App extends Component {
return (
<TypoModal text={this.typo} context={this.selectionContext}
closeCallback={this.modalClosedCallback}
closeCallback={this.modalClosedCallback.bind(true)}
show={this.state.correctionMode}/>
);
}
// This method is invoked when a modal has been closed
modalClosedCallback = () => {
modalClosedCallback = (requestSent) => {
if (!requestSent) {
this.setState({
correctionMode: false
});
return;
}
this.setState({
correctionMode: false,
isTimeout: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment