Brave on Linux sometimes closes windows with "alt" and tabs with "ctrl"

Description of the issue: Under certain circumstances on the Gnome desktop the “ctrl” key will start the “close tab” action and the “alt” tab will start the “close window” action.

How can this issue be reproduced?

EDIT: There’s an additional unknown step that must trigger this behavior, while opening this thread I could reliable reproduce this behavior with these instructions, but after an hour or so I can’t anymore. I have had this behavior before so I know it wasn’t a random one off.

  1. Install Brave via flatpak from flathub
  2. Open Brave
  3. Use the trackpad gesture or “super” key to show the activities key.
  4. Select the Brave window
  5. Now some keys misbehave:
    • Pushing the “ctrl” key will close any tab
    • Pushing the “alt” key will close the window, if the window has multiple tabs it will ask the confirmation to close all the tabs
  6. Pressing the “tab” key restores the “ctrl” and “alt” keys behaviors

Expected result: For “ctrl” and “alt” to not change behavior

Brave Version( check About Brave): Version 1.78.102 Chromium: 136.0.7103.113 (Official Build)

Additional Information:

Update: I had to

This seems to be related to something on Gnome, see this issue there

@Mattches

OP has good, detailed report of Brave Browser (Linux OS - flatpak installation - Gnome) performance issue.

@vraiment

Using Brave Browser, I ran into a bot problem - could not view your “this issue there”.

Maybe try other browser? My understanding is the issue tracking for Gnome is dealing with heavy problems with bots and they have setup very aggressive filtering

@vraiment

Used Firefox . . . (thanks).

Screenshot from your link:

Full Topic Title from your link:

Window manager warning: META_CURRENT_TIME used to choose focus window; focus window may not be correct. on every workspace switching using the 4-finger gesture

Is there something I can do to log keyboard events on Brave so I can help debug this on the Gnome side?

@vraiment

I would wait for @Mattches (of Brave Support) to determine how to proceed.

Yeah if it’s happening on other browser and applications outside of Brave then it is probably a system issue/setting that is causing the behavior.

Seeing some other users report this:

1 Like

Is there any setting/command line argument/environment variable I can set to get any additional logging so I can provide that data to the Gnome project?

This also seem to be related: https://bugs.launchpad.net/mutter/+bug/1857392
This does fix the issue: https://askubuntu.com/a/1532813/1640021
Issue on Gnome issue tracker: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8443
Issue on Ubuntu issue tracker: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2112439