Bug 1393336

Summary: Firefox captures ALT key (and shows its main menu) when used in combination with other keys under Wayland
Product: [Fedora] Fedora Reporter: Hedayat Vatankhah <hedayatv>
Component: waylandAssignee: Adam Jackson <ajax>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: 29CC: adrien-xx-redhatbz, ajax, alexander, cbm, fedora, gecko-bugs-nobody, jhorak, marko.m.kostic, moceap, pjasicek, stransky
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-27 21:52:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1277927    
Attachments:
Description Flags
menu bar in firefox shown on the alt+shift
none
menu bar in firefox shown on the alt+shift none

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.

Comment 26 Ben Cotton 2019-10-31 19:38:45 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
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 '29'.

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 29 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 27 Ben Cotton 2019-11-27 21:52:43 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.