desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Search Window Closes When Switching Keyboard Language in GNOME

Open iskepr opened this issue 8 months ago • 6 comments

Captchas

  • [x] I have read the instructions.
  • [x] I have searched existing issues and avoided creating duplicates.
  • [x] I am not filing an enhancement request.
  • [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.
  • [x] I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.

What happened?

When using the Zen browser on the GNOME desktop environment, the search window closes automatically when switching the keyboard language.

Version

1.10.3b

What platform are you seeing the problem on?

Linux (Flatpak)

What component is this issue related to?

URL Bar

Relevant log output if applicable


iskepr avatar Apr 03 '25 11:04 iskepr

URL bar also loses focus on macOS when Zen lose focus. This is especially annoying when trying to paste contents from a Clipboard History manager.

https://github.com/user-attachments/assets/f5db46dd-342a-4c53-9b7f-4f3c5b19e0b6

ventsislav-georgiev avatar May 03 '25 07:05 ventsislav-georgiev

Hi, @iskepr. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • The Zen browser's search window closes automatically when switching keyboard languages on GNOME.
  • This occurs on version 1.10.3b using Flatpak on Linux.
  • ventsislav-georgiev noted a similar focus issue on macOS, where the URL bar loses focus when Zen loses focus.
  • Suggests a broader focus-related issue across different platforms.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the desktop repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Jun 03 '25 16:06 dosubot[bot]

The issue still exists, the url bar search popup closes automatically when you unfocus the main window. Which makes it unsuitable to copy paste things in it from a clipboard manager.

ventsislav-georgiev avatar Jun 03 '25 18:06 ventsislav-georgiev

The problem still exists

iskepr avatar Jun 06 '25 14:06 iskepr

A tip found in other issues created about the same: Turning off the mouse pointer locator (when pressing ctrl) seems to prevent the issue.

Propheticus avatar Jun 06 '25 15:06 Propheticus

I use Manjaro KDE (X11).

This issue definitely exists, but it’s not specific to Zen Browser — I experience the same behavior in Mozilla Firefox.

It seems that in Gecko-based browsers (like Firefox and Zen), input elements lose focus when switching keyboard layouts using certain desktop environment tools (such as KDE’s layout switcher). This doesn't happen in Chromium-based browsers.

I was able to solve the issue by switching to legacy (native XKB) layout switching, instead of using KDE’s built-in layout management.

On KDE (X11), you can go to:

System Settings -> Input Devices -> Keyboard -> Layouts -> Configure Switching -> Legacy Shortcuts

and choose one of the XKB-compatible shortcuts, such as:

  • Caps Lock
  • Alt + Shift
  • Meta (win) + Space
  • Ctrl + Shift

These shortcuts use XKB options under the hood (e.g. grp:caps_toggle, grp:alt_shift_toggle, etc.) and do not cause the input focus loss issue in Gecko-based browsers.

Hope this helps anyone experiencing the same issue under X11!

dofi4ka avatar Jun 15 '25 20:06 dofi4ka

I'm using Gnome with X11 and switching to Wayland helped solve the problem

goodmartian avatar Jun 23 '25 03:06 goodmartian

I'm on wayland (fedora) and have this issue ONLY in Zen. Same Firefox version, as other browsers works fine. Also it not reproduced in old version of zen browser, so it clearly zen bug.

Fedora Linux 42 (Workstation Edition), Gnome, Wayland 🐛 Zen (with bug): 1.13.2b (Firefox 139.0.4) (64-bit) ✅ Zen (without bug): 1.0.1-a.19 (Firefox 132.0.1) ✅ Firefox (without bug): 139.0.4 (64-bit) (same as bugged zen version uses)

Shortcut: Alt + Space Zen URL Bar mode: Any Installed via: both - flatpack and tar.gz version have this issue

Maybe important - when gnome switch layouts it draw an graphical overlay that shows available layouts

Image

It even not visible if user press shortcut fast enough, but it still grab the input focus for a moment. Usually apps gets focus back after language switched, but not zen. Probably zen re-creates input after it loose focus or something like that

Akiyamka avatar Jun 24 '25 16:06 Akiyamka

Seems like Quick Lang Switch extension can be used as a workaround for this problem. Installing it disables layout switch popup and prevents window from losing focus

hotsezus avatar Jul 06 '25 10:07 hotsezus

@hotsezus I tested this extension and can confirm that it really works as workaround

Akiyamka avatar Jul 07 '25 14:07 Akiyamka

Workaround doesn't work for me. Tested with all extensions turned off except quick lang switch and super+spacebar shortcut. Can confirm that bug only happens in X11 and not Wayland.

Rikopara avatar Jul 08 '25 08:07 Rikopara

Looks like we have two bugs here, same issue but in very different conditions

Akiyamka avatar Jul 08 '25 15:07 Akiyamka

Hi, @iskepr. I'm Dosu, and I'm helping the desktop team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that in Zen browser 1.10.3b on GNOME (Linux Flatpak), the search window closes automatically when switching keyboard language.
  • This focus-loss issue also affects the URL bar and occurs on both Linux and macOS.
  • Some users noted similar problems in Firefox under KDE with certain layout switchers, but it is more specific to Zen on Wayland.
  • Workarounds include switching to Wayland, using legacy XKB shortcuts on KDE, or installing the GNOME "Quick Lang Switch" extension, though effectiveness varies.
  • The bug may relate to how Zen handles input focus after losing it.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Zen browser by commenting here to keep the discussion open.
  • Otherwise, I will automatically close this issue in 7 days.

Thanks for your understanding and contribution!

dosubot[bot] avatar Aug 08 '25 16:08 dosubot[bot]