Zulip-desktop: Focus doesn't work properly on Linux/Windows

Created on 1 Aug 2017  路  12Comments  路  Source: zulip/zulip-desktop

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.

High Bug linux windows

All 12 comments

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

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

Interesting.

Instead of alt-tab, try mousing over the Zulip app? Or clicking on the
title bar.

For me the issue reproduces on any of mouse over (which I've set my window
manager to cause the window to be focused), click title bar, 鈥媜r alt-tab.
Only clicking inside the window succeeds in making the keyboard shortcuts
start working again.

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.

鈥婽hose steps work fine. Ctrl-= and Ctrl-- successfully zoom the view, but
the webapp's shortcuts (even up/down to move between messages) have no
effect.

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.

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

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

Update - Well, it does not work as expected 馃槶

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

I verified it's working well for me. :tada: :rocket:

Works for me -- thanks @akashnimare !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anshumanv picture anshumanv  路  6Comments

abhigyank picture abhigyank  路  10Comments

dylnuge picture dylnuge  路  5Comments

swallitsch picture swallitsch  路  7Comments

brainwane picture brainwane  路  9Comments