Focus the search box on Ctrl/Cmd+F shortcut

For #229
This commit is contained in:
Yuya Ochiai
2016-08-14 00:08:18 +09:00
parent 1d851fd6de
commit 647e396fad
3 changed files with 28 additions and 1 deletions

View File

@@ -75,6 +75,12 @@ var MainPage = React.createClass({
this.refs[`mattermostView${this.state.key}`].clearCacheAndReload();
});
// activate search box in current tab
ipcRenderer.on('activate-search-box', (event) => {
let webview = document.getElementById('mattermostView' + thisObj.state.key);
webview.send('activate-search-box');
});
var focusListener = function() {
var webview = document.getElementById('mattermostView' + thisObj.state.key);
webview.focus();