Merge branch 'master' into blur-webview-on-deactivation
This commit is contained in:
@@ -104,6 +104,10 @@ const MainPage = createReactClass({
|
||||
ipcRenderer.on('add-server', () => {
|
||||
this.addServer();
|
||||
});
|
||||
|
||||
ipcRenderer.on('focus-on-webview', () => {
|
||||
this.focusOnWebView();
|
||||
});
|
||||
},
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
if (prevState.key !== this.state.key) { // i.e. When tab has been changed
|
||||
@@ -207,6 +211,11 @@ const MainPage = createReactClass({
|
||||
showNewTeamModal: true
|
||||
});
|
||||
},
|
||||
|
||||
focusOnWebView() {
|
||||
this.refs[`mattermostView${this.state.key}`].focusOnWebView();
|
||||
},
|
||||
|
||||
render() {
|
||||
var self = this;
|
||||
|
||||
|
@@ -108,6 +108,10 @@ function createMainWindow(config, options) {
|
||||
}
|
||||
});
|
||||
|
||||
mainWindow.on('sheet-end', () => {
|
||||
mainWindow.webContents.send('focus-on-webview');
|
||||
});
|
||||
|
||||
return mainWindow;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user