Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
jasonblais opened this issue Oct 11, 2016 · 7 comments

Comments

@jasonblais
Copy link
Contributor

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
  1. Upload file using CMD or CTRL + U
  2. Choose file with keyboard + hit enter to select
  3. 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

@yuya-oc
Copy link
Contributor

yuya-oc commented Nov 3, 2016

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.

@jasonblais
Copy link
Contributor Author

Requires further investigation so removing milestone for now

@jasonblais jasonblais removed this from the v3.5.0 milestone Nov 28, 2016
@jasonblais jasonblais changed the title Mac: After uploading a file with the keyboard shortcut, put the focus in the text box Mac: After uploading a file with the keyboard shortcut CTRL/CMD+U, put the focus in the text box Dec 1, 2016
@jasonblais jasonblais added Hackfest null and removed Hacktoberfest null labels Dec 4, 2016
@jasonblais jasonblais removed the Hackfest null label Jan 9, 2017
@jasonblais jasonblais added this to the v3.7.0 milestone Feb 21, 2017
@jasonblais jasonblais changed the title Mac: After uploading a file with the keyboard shortcut CTRL/CMD+U, put the focus in the text box [Help Wanted] Mac: After uploading a file with the keyboard shortcut CTRL/CMD+U, put the focus in the text box Feb 26, 2017
@jasonblais jasonblais changed the title [Help Wanted] Mac: After uploading a file with the keyboard shortcut CTRL/CMD+U, put the focus in the text box Mac: After uploading a file with the keyboard shortcut CTRL/CMD+U, put the focus in the text box Mar 22, 2017
@yuya-oc
Copy link
Contributor

yuya-oc commented Apr 4, 2017

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).

@jasonblais jasonblais modified the milestones: v3.9.0/3.10.0, v3.7.0/3.8.0 Apr 4, 2017
@yuya-oc
Copy link
Contributor

yuya-oc commented Apr 21, 2017

Necessary event was added to Electron. This issue can be fixed in future.

electron/electron#9108

@jasonblais
Copy link
Contributor Author

@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.

@yuya-oc
Copy link
Contributor

yuya-oc commented May 2, 2017

Almost done in another branch. We need to wait Electron 1.6.8 which is still beta.

@yuya-oc
Copy link
Contributor

yuya-oc commented Jun 6, 2017

Closed via #525

@yuya-oc yuya-oc closed this as completed Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants