Merge branch 'master' into blur-webview-on-deactivation

This commit is contained in:
Yuya Ochiai
2017-06-06 23:16:50 +09:00
committed by GitHub
3 changed files with 17 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ Release date: TBD
- Fixed desktop notifications not working when the window has been minimized from inactive state. - Fixed desktop notifications not working when the window has been minimized from inactive state.
[#522](https://github.com/mattermost/desktop/issues/522) [#522](https://github.com/mattermost/desktop/issues/522)
#### Mac
- Fixed an issue where the text box didn't keep focus after uploading a file.
[#341](https://github.com/mattermost/desktop/issues/341)
--- ---
## Release v3.7.0 ## Release v3.7.0

View File

@@ -104,6 +104,10 @@ const MainPage = createReactClass({
ipcRenderer.on('add-server', () => { ipcRenderer.on('add-server', () => {
this.addServer(); this.addServer();
}); });
ipcRenderer.on('focus-on-webview', () => {
this.focusOnWebView();
});
}, },
componentDidUpdate(prevProps, prevState) { componentDidUpdate(prevProps, prevState) {
if (prevState.key !== this.state.key) { // i.e. When tab has been changed if (prevState.key !== this.state.key) { // i.e. When tab has been changed
@@ -207,6 +211,11 @@ const MainPage = createReactClass({
showNewTeamModal: true showNewTeamModal: true
}); });
}, },
focusOnWebView() {
this.refs[`mattermostView${this.state.key}`].focusOnWebView();
},
render() { render() {
var self = this; var self = this;

View File

@@ -108,6 +108,10 @@ function createMainWindow(config, options) {
} }
}); });
mainWindow.on('sheet-end', () => {
mainWindow.webContents.send('focus-on-webview');
});
return mainWindow; return mainWindow;
} }