Change to explicit close function for closing finder

This commit is contained in:
sudheer
2018-07-31 22:37:45 +05:30
parent 6b235afbd1
commit 579f99a800

View File

@@ -144,7 +144,7 @@ const MainPage = createReactClass({
});
ipcRenderer.on('toggle-find', () => {
this.toggleFinder(true);
this.activateFinder(true);
});
},
componentDidUpdate(prevProps, prevState) {
@@ -257,13 +257,19 @@ const MainPage = createReactClass({
}
},
toggleFinder(state) {
activateFinder() {
this.setState({
finderVisible: state || !this.state.finderVisible,
finderVisible: true,
focusFinder: true,
});
},
closeFinder() {
this.setState({
finderVisible: false,
});
},
inputBlur() {
this.setState({
focusFinder: false,
@@ -388,7 +394,7 @@ const MainPage = createReactClass({
{ this.state.finderVisible ? (
<Finder
webviewKey={this.state.key}
close={this.toggleFinder}
close={this.closeFinder}
focusState={this.state.focusFinder}
inputBlur={this.inputBlur}
/>