Bug 1393336 - Firefox captures ALT key (and shows its main menu) when used in combination with other keys under Wayland
Summary: Firefox captures ALT key (and shows its main menu) when used in combination w...
Keywords:
Status: MODIFIED
Alias: None
Product: Fedora
Classification: Fedora
Component: wayland
Version: 29
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1398735 1405127 (view as bug list)
Depends On:
Blocks: WaylandRelated
TreeView+ depends on / blocked
 
Reported: 2016-11-09 11:07 UTC by Hedayat Vatankhah
Modified: 2019-04-08 16:10 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-24 23:00:11 UTC


Attachments (Terms of Use)
menu bar in firefox shown on the alt+shift (82 bytes, text/plain)
2018-01-20 08:36 UTC, Марко М. Костић (Marko M. Kostić)
no flags Details
menu bar in firefox shown on the alt+shift (33.58 KB, application/octet-stream)
2018-01-20 08:38 UTC, Марко М. Костић (Marko M. Kostić)
no flags Details


Links
System ID Priority Status Summary Last Updated
GNOME Bugzilla 776122 None None None 2019-02-26 12:58:47 UTC
Mozilla Foundation 1321007 None None None 2019-02-26 12:58:47 UTC

Description Hedayat Vatankhah 2016-11-09 11:07:50 UTC
Description of problem:
First, sorry for assigning it to firefox. I don't know where should I report this bug.
Anyway, this happens when using Firefox under Wayland (gnome) and Firefox window has focus (Note: main menu in firefox is hidden by default in my case):
1. If I press Alt+Tab, when pressing Tab, firefox's main menu appears, and if I release them when another application is  selected, main menu will disappear
2. If I press Alt+Tab like above, but cycle applications until it select firefox itself again, menu bar won't disappear.
3. (Most annoying state): I use Alt+Shift to switch keyboard layouts. So, each time I use Alt+Shift to switch keyboard layouts while in firefox, menu bar appears and doesn't disappear.

So, if you use a key combination with Alt so that when you release them firefox is still focused, its menu bar will appear (and so the menu will gain keyboard focus and your next key will hit the menu).

Version-Release number of selected component (if applicable):
I use F25 beta with all updates applied till November 9th.

How reproducible:
100%

Comment 1 Марко М. Костић (Marko M. Kostić) 2016-11-25 16:52:05 UTC
This bug also affects me. I mainly experience it when using Alt+Shift to change the keyboard layout. As I fulfill my social needs through Firefox and because I use three keyboard layouts to communicate (English, Serbian in latin script and Serbian in cyrillic script) this bug makes the experience noticeably annoying.

Comment 2 Adrien Bustany 2016-11-28 09:25:37 UTC
Upstream GNOME bug: https://bugzilla.gnome.org/show_bug.cgi?id=750141

Comment 3 Martin Stransky 2016-12-15 10:10:37 UTC
*** Bug 1398735 has been marked as a duplicate of this bug. ***

Comment 4 Mosaab Alzoubi 2016-12-15 10:59:57 UTC
Should be fixed here:

https://patchwork.freedesktop.org/patch/123758/

Just update Wayland.

Comment 5 Mosaab Alzoubi 2016-12-15 12:41:20 UTC
Tried the patch, Doesn't fix this bug :(

Comment 6 Martin Stransky 2016-12-19 12:02:36 UTC
*** Bug 1405127 has been marked as a duplicate of this bug. ***

Comment 7 Hedayat Vatankhah 2017-06-24 06:35:59 UTC
In Fedora 26: Alt+Tab issue is fixed, but Alt+Shift issue remains. Even using Alt+Ctrl doesn't show such problems, so I can only reproduce this problem using Alt+Shift.

Comment 8 Марко М. Костић (Marko M. Kostić) 2017-07-25 13:13:21 UTC
Issue still exists in Fedora 26, on Wayland session and in Firefox Nightly 56.a1.

As a workaround, open about:config and change the setting named ui.key.menuAccessKeyFocuses to false. That will stop the menu from getting showed when you press Alt. You can still access the menu by clicking on the empty space in the tabs bar and selecting the option to show the menu.

Comment 9 Christian Stadelmann 2017-10-27 19:36:58 UTC
(In reply to Hedayat Vatankhah from comment #0)
> Description of problem:
> First, sorry for assigning it to firefox. I don't know where should I report
> this bug.
> Anyway, this happens when using Firefox under Wayland (gnome) and Firefox
> window has focus (Note: main menu in firefox is hidden by default in my
> case):
> 1. If I press Alt+Tab, when pressing Tab, firefox's main menu appears, and
> if I release them when another application is  selected, main menu will
> disappear
> 2. If I press Alt+Tab like above, but cycle applications until it select
> firefox itself again, menu bar won't disappear.
> 3. (Most annoying state): I use Alt+Shift to switch keyboard layouts. So,
> each time I use Alt+Shift to switch keyboard layouts while in firefox, menu
> bar appears and doesn't disappear.

You might be using Super+Tab to switch between applications and Super+Space to switch between keyboard layouts. Nowadays™ the "Super“ key should be used for window-manager-shortcuts. See https://wiki.gnome.org/Design/OS/KeyboardShortcuts.

Comment 10 Fedora End Of Life 2017-11-16 18:37:26 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 11 Christian Stadelmann 2017-11-16 22:53:02 UTC
I cannot reproduce this issue any more with Firefox 57, no matter whether I allow client-side decorations or not. I think this bug report can be closed.

Comment 12 Martin Stransky 2017-11-20 10:28:25 UTC
Thanks!

Comment 13 Марко М. Костић (Marko M. Kostić) 2018-01-20 08:36:26 UTC
Created attachment 1383721 [details]
menu bar in firefox shown on the alt+shift

It seems that the issue reappeared in Firefox 57 and Fedora 27. Can the issue be reopened?

Comment 14 Марко М. Костић (Marko M. Kostić) 2018-01-20 08:38:02 UTC
Created attachment 1383722 [details]
menu bar in firefox shown on the alt+shift

Comment 15 Martin Stransky 2018-01-22 15:45:08 UTC
I'm unable to reproduce with Firefox 57 / Fedora 27.

Comment 16 Adrien Bustany 2018-01-22 15:48:58 UTC
I'm also unable to reproduce the issue with the same configuration (Firefox 57 / Fedora 27), using alt-tab and alt-shift-tab to test.

Comment 17 Марко М. Костић (Marko M. Kostić) 2018-01-22 17:53:53 UTC
Dear Martin and Adrien,

To reproduce it in Firefox 57 and Fedora 27:

- make sure that you use Alt+Shift key combo for switching to another layout (Gnome Tweak Tool > Keyboard and Mouse > Additional input sources, Switching to another layout, check only that box),
- open the Firefox 57.0.4 from the updates-testing Fedora repo,
- try to alt+shift to change the layouts while the Firefox window is open.

Observe how menu is showed when the Alt key is pressed.

If that does not reproduce it, than it's maybe something related to the combination of the layouts itself. I'm using English (US) and Serbian Cyrillic (Serbia).

I was able to reproduce it with a standard fresh user on my Fedora 27 system.

Comment 18 Марко М. Костић (Marko M. Kostić) 2018-01-25 19:03:28 UTC
I can still reproduce it in Firefox 58 stable (Fedora build) and Firefox 60 Nightly (Mozilla build), on Fedora 27.

Comment 19 Mosaab Alzoubi 2018-01-26 18:37:21 UTC
(In reply to Марко М. Костић (Marko M. Kostić) from comment #18)
> I can still reproduce it in Firefox 58 stable (Fedora build) and Firefox 60
> Nightly (Mozilla build), on Fedora 27.

It isn't Firefox issue, it is Wayland issue.

No problems with Xorg.

Comment 20 Hedayat Vatankhah 2018-01-29 10:10:45 UTC
Yeah... but it doesn't happen with other applications under Wayland. Only with firefox (As far as I've tested).

Comment 21 Mosaab Alzoubi 2018-02-01 08:50:49 UTC
(In reply to Hedayat Vatankhah from comment #20)
> Yeah... but it doesn't happen with other applications under Wayland. Only
> with firefox (As far as I've tested).

It's definitely Wayland problem. Try Rambox (which also use Alt for hide and show menu bar).

Comment 22 Hedayat Vatankhah 2018-03-25 19:01:07 UTC
Still happens in F27. 
Note that if I press Shift and then Alt, the problem doesn't happen. But when I press Alt and then Shift, it happens.

Comment 23 Colin Macdonald 2018-08-24 22:57:04 UTC
I cannot reproduce on F29.  Fixed?  Althought upstream issues are still open...

Comment 24 Марко М. Костић (Marko M. Kostić) 2018-08-25 09:03:27 UTC
I am still experiencing it on Fedora 28 and Firefox Beta 62.0b20 (Mozilla's build). Interestingly enough, it doesn't trigger when I try to create a GIF of it via the Peek application[0].

Can you leave the bug open until Fedora 29 gets released so I could verify?

[0] https://flathub.org/apps/details/com.uploadedlobster.peek

Comment 25 Hedayat Vatankhah 2018-11-17 09:39:33 UTC
Well, not only it has the same problem under F29 under wayland, I'm also experiencing a variant of this issue under X11!! It seems that the problem is more fundamental and new X11 version has exposed it here too.

Under X11, I have this problem: If I press Alt and then Shift, and then release Alt (while Shift is still pressed), firefox main menu appears and doesn't disappear when I release Shift. Any other sequence of pressing & releasing these keys doesn't show this behaviour. And in all cases keyboard layout changes successfully.


Note You need to log in before you can comment on or make changes to this bug.