Skip to content

Focus doesn't work properly on Linux/Windows #251

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

Closed
timabbott opened this issue Aug 1, 2017 · 12 comments
Closed

Focus doesn't work properly on Linux/Windows #251

timabbott opened this issue Aug 1, 2017 · 12 comments

Comments

@timabbott
Copy link
Member

On Ubuntu 16.04, with the master branch, if you alt-tab to the window, you need to click into the window in order for any of our keyboard shortcuts to work, which is pretty annoying.

@gnprice
Copy link
Member

gnprice commented Aug 1, 2017

I've been seeing the same thing today -- on Debian stretch, running GNOME.

@geeeeeeeeek
Copy link
Collaborator

I didn't reproduce this issue on the master branch.

Steps:

  1. Focus on another app (terminal).
  2. Alt-tab to Zulip.
  3. Ctrl+1 -> Switch to first tab.
  4. Ctrl+=/Ctrl+- -> Zoom in/out webview.

2

@gnprice
Copy link
Member

gnprice commented Aug 2, 2017 via email

@zulip zulip deleted a comment from gnprice Aug 4, 2017
@akashnimare
Copy link
Member

I can't reproduce this either. @timabbott, @gnprice can you check if following steps works on your system -

Focus on another app (terminal).
Alt-tab to Zulip.
Ctrl+1 -> Switch to first tab.
Ctrl+=/Ctrl+- -> Zoom in/out webview.

@gnprice
Copy link
Member

gnprice commented Aug 5, 2017 via email

@akashnimare
Copy link
Member

Okay, I can reproduce this now. I thought you guys were talking about the desktop shortcuts (Ctrl+1, Ctrl+= etc) which work on Alt+tab. @geeeeeeeeek try reproducing this using J and K which does not work when the window loses focus. I confirm that it's caused by https://github.com/zulip/zulip-electron/pull/241. The problem is when you focus other app and get back to Zulip using Alt + tab the browser window gets focus not the webview and that is why one has to click within the webview for the focus.

@akashnimare
Copy link
Member

@geeeeeeeeek we need to find a solution which fixes this as well as #216.

akashnimare added a commit that referenced this issue Aug 5, 2017
@akashnimare
Copy link
Member

akashnimare commented Aug 5, 2017

Can you guys pull up window-focus-fix and check if this fixes #216 + #251?

Update - Well, it does not work as expected 😭

@akashnimare akashnimare changed the title Focus doesn't work properly on Linux Focus doesn't work properly on Linux/Windows Aug 8, 2017
@akashnimare
Copy link
Member

I have pushed a fix again. I'm sure it should fix #216 + #251 😞
Can you guys please check again using window-focus-fix?

akashnimare added a commit that referenced this issue Aug 8, 2017
🎉 Focus webview contents on Window focus #216 #251
@akashnimare
Copy link
Member

Fixed in zulip/zulip-electron@20feb9b.

@timabbott
Copy link
Member Author

I verified it's working well for me. 🎉 🚀

@gnprice
Copy link
Member

gnprice commented Aug 8, 2017

Works for me -- thanks @akashnimare !

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

4 participants