Desktop: Mac: After uploading a file with the keyboard shortcut CTRL/CMD+U, put the focus in the text box

Created on 11 Oct 2016  路  7Comments  路  Source: mattermost/desktop

I confirm (by marking "x" in the [ ] below):


Summary

Mac: After uploading a file with the keyboard shortcut, put the focus in the text box

Steps to reproduce

  • Operating System: Mac
  • Mattermost Desktop App v3.4.1
  • Mattermost Server v3.4
  • Upload file using CMD or CTRL + U
  • Choose file with keyboard + hit enter to select
  • Hit enter to send the message

    Expected behavior

Describe your issue in detail.

Observed behavior

Cursor should be in message input box after selecting the file

MacOS TypBug

All 7 comments

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.

https://github.com/electron/electron/pull/9108

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fmp777 picture fmp777  路  6Comments

mcarthur-cpt picture mcarthur-cpt  路  6Comments

attzonko picture attzonko  路  5Comments

JtheBAB picture JtheBAB  路  5Comments

nerfologist picture nerfologist  路  7Comments