I confirm (by marking "x" in the [ ] below):
Mac: After uploading a file with the keyboard shortcut, put the focus in the text box
Describe your issue in detail.
Cursor should be in message input box after selecting the file
Note:
It seems that the server always puts the focus in the text box, and the problem is not reproduced on Windows.
I also tried a very simple electron app without webview. It doesn't reproduce the problem.
const {app, BrowserWindow} = require('electron');
var mainWindow;
app.on('ready', () => {
mainWindow = new BrowserWindow();
mainWindow.loadURL(MATTERMOST_SERVER_URL);
});
So there might be something wrong in our implementation. Or, there is difference in webview itself on macOS.
Requires further investigation so removing milestone for now
The point is that the dialog is attached to the main window on macOS. It prevents our event handlers, so the webview couldn't get focus correctly.
To solve this, an event which is not supported by Electron is necessary. I confirmed the problem was solved by using modified Electron. So I'll prepare a PR for this.
But probably it doesn't meet the next milestone even if the PR is merged (it would be still beta when we release the next one).
Necessary event was added to Electron. This issue can be fixed in future.
@yuya-oc How much work would you say it would be to fix this issue? We got another report about it, where you can hit "Enter" to send a file attachment, since the focus is away from the message input box.
Almost done in another branch. We need to wait Electron 1.6.8 which is still beta.
Closed via #525