Merge pull request #525 from yuya-oc/sheet-events
Use sheet-end event to handle focus when closing macOS file upload dialog
This commit is contained in:
@@ -24,6 +24,10 @@ Release date: TBD
|
|||||||
- Fixed mis-aligned `+` button of tab bar.
|
- Fixed mis-aligned `+` button of tab bar.
|
||||||
[#541](https://github.com/mattermost/desktop/issues/541)
|
[#541](https://github.com/mattermost/desktop/issues/541)
|
||||||
|
|
||||||
|
#### 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
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
|
@@ -107,6 +107,10 @@ function createMainWindow(config, options) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mainWindow.on('sheet-end', () => {
|
||||||
|
mainWindow.webContents.send('focus-on-webview');
|
||||||
|
});
|
||||||
|
|
||||||
return mainWindow;
|
return mainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user