Firefox menus are misplaced

Bug #1721614 reported by gpothier
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
New
Unknown
firefox (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Sometimes Firefox places its menus at incorrect locations. See attached screenshot and video. This happens at least with the main (hamburger icon) menu, bookmark folders, and context menu. Moving the Firefox window temporarily solves the problem. It usually happens after resume from suspend, which in general in my case is accompanied by a display reconfiguration (unplug external monitor, suspend, resume, plug other external monitor).
This looks very similar to this another bug (https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1641629) which I reported against Firefox 49 and that was resolved by installing Firefox 52. This time, it occurred in Firefox 55, and also now in Firefox 56. It started occurring sometime during the 17.10 cycle, which I have been using for a few months.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: firefox 56.0+build6-0ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3
Uname: Linux 4.13.0-12-generic x86_64
AddonCompatCheckDisabled: False
ApportVersion: 2.20.7-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC1D0p: gpothier 2684 F...m pulseaudio
 /dev/snd/controlC1: gpothier 2684 F.... pulseaudio
 /dev/snd/controlC0: gpothier 2684 F.... pulseaudio
BuildID: 20171003222101
Channel: Unavailable
CurrentDesktop: GNOME
Date: Thu Oct 5 15:23:47 2017
ForcedLayersAccel: False
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
IncompatibleExtensions:
 English (South Africa) Language Pack - <email address hidden>
 English (GB) Language Pack - <email address hidden>
 Default - {972ce4c6-7e08-4474-a285-3208198ce6fd}
InstallationDate: Installed on 2015-01-23 (985 days ago)
InstallationMedia: Ubuntu-GNOME 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
MostRecentCrashID: bp-8649eb9a-09b9-49fc-8320-99cbf1171004
Plugins: Shockwave Flash - /usr/lib/flashplugin-installer/libflashplayer.so
PrefSources: prefs.js
Profiles: Profile0 (Default) - LastVersion=56.0/20171003222101 (In use)
RunningIncompatibleAddons: True
SourcePackage: firefox
SubmittedCrashIDs:
 bp-8649eb9a-09b9-49fc-8320-99cbf1171004
 bp-604f3b87-472e-4026-8588-3d2122160725
 bp-1cd058b7-bfd2-4105-a9b4-1852d2160703
 bp-b5b0d8b4-2b5b-40f5-b468-f5eec2160122
 bp-aba8367f-3da0-4f1c-9342-b377f2151224
UpgradeStatus: Upgraded to artful on 2017-06-15 (112 days ago)
dmi.bios.date: 03/30/2015
dmi.bios.vendor: LENOVO
dmi.bios.version: 76CN43WW
dmi.board.asset.tag: No Asset Tag
dmi.board.name: Yoga2
dmi.board.vendor: LENOVO
dmi.board.version: 31900058STD
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo Yoga 2 Pro
dmi.modalias: dmi:bvnLENOVO:bvr76CN43WW:bd03/30/2015:svnLENOVO:pn20266:pvrLenovoYoga2Pro:rvnLENOVO:rnYoga2:rvr31900058STD:cvnLENOVO:ct10:cvrLenovoYoga2Pro:
dmi.product.family: IDEAPAD
dmi.product.name: 20266
dmi.product.version: Lenovo Yoga 2 Pro
dmi.sys.vendor: LENOVO

Revision history for this message
gpothier (gpothier) wrote :
Revision history for this message
gpothier (gpothier) wrote :

This video shows that the bookmark folder that should appear below the corresponding bookmark icon appears elsewhere. It also shows that the menu responds to mouse movements as if it was correctly placed: the entries are highlighted/unhighlighted as I move the mouse under the bookmark icon, where the menu should be.

Revision history for this message
gpothier (gpothier) wrote :

A precision: suspend/resume is not needed to reproduce the issue. Just disconnecting the external monitor is enough to consistently trigger the issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Thorsten Munsch (thorsten-munsch) wrote :

I'm affected of the "invisible" burger menu aswell. After click hovering over it shows there are the menu buttons below.

I didn't notice the problems with the bookmarkbar or context menus mentioned by gpothier.

Burger button stopped being displayed normal since FF56. Downloaded the FF56.01 tarball, same behaviour.

Xubuntu 14.04.5 LTS (4.4.0-97-lowlatency)
Firefox 56.0+build6-0ubuntu0.14.04.2

Revision history for this message
Thorsten Munsch (thorsten-munsch) wrote :

Tested 58.0a1 tarball -> burger menu not visible but works if you know the button position. ;-)

Revision history for this message
Thorsten Munsch (thorsten-munsch) wrote :

But in 58.0a1 no button menu is drawn correct. Only the bookmark button toggles the bookmarklist on the left of the window (uBlock, NoScript & burger menu).

In 56 uBlock & NoScript buttons worked properly. Only the burger did not.

In 58 no one, except the bookmark-toggle. In 56 the button is different and doesn't toggle the list.

Revision history for this message
Thorsten Munsch (thorsten-munsch) wrote :

Starting with --safe-mode gets the burger menu working properly again.

In my profile I loaded the menu defaults via customization, doesn't solve it.

Revision history for this message
Thorsten Munsch (thorsten-munsch) wrote :

I found out that it doesn't work with my Nvidia GT430 and propritary driver 384.90.

Bought an AMD RX550 last week, uninstalled the Nvidia driver, removed the Nvidia, AMD card in, boot up 14.04 and the burger menu and everything is working fine again in the browser.

I noticed then that the current amdgpu driver requires >16.04, switched back to Nvidia card, installed 384.90 driver and voilá the menus are behaving like written above again.

Revision history for this message
gpothier (gpothier) wrote :

Hi Thorsten, I think what you experience is another bug, as I don't experience your symptoms (invisible burger menu) and you don't seem to experience mine (misplaced or offset menus).

Revision history for this message
In , gpothier (gpothier) wrote :

Created attachment 8921616
firefox-bug.mp4

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171024001719

Steps to reproduce:

Computer has two monitors configured (laptop's + external). Open Firefox. Then unplug the external monitor. Click on UI elements that cause a popup menu to appear (eg. right click to display context menu, click on bookmark folder, or on "burger" menu icon)

Actual results:

The popup menus appear at seemingly random locations. Moreover, the menu item highlighting do not match the actual mouse position (see attached video).
Happens on v56 and v57 beta.

Expected results:

The popup menus should appear at their correct location: right next to the mouse cursor for context menu, or next to the UI element that triggers the popup).

Revision history for this message
In , gpothier (gpothier) wrote :
Revision history for this message
gpothier (gpothier) wrote :

Firefox v57 beta also affected. Reported upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1411398

gpothier (gpothier)
tags: removed: wayland-session
Revision history for this message
In , gpothier (gpothier) wrote :

The bug is still present in v58.0b11. I'll try to give more precisions. As I wrote earlier, pop up menus appear at incorrect locations after reconfiguring monitors. As shown in the attached video, they can appear quite far away from their correct location. Maybe an important point is that the DPI settings change between configurations. One configuration is with only the internal laptop monitor at 3200 x 1800 with high DPI settings, and the other one is internal + external monitor, both at 1920 x 1080 (normal DPI settings).

It seems there is some kind of caching of individual menu positions, and this caching seems to be invalidated when the requested menu position changes; afterwards the menus appear in their correct positions until the next monitor reconfiguration. This invalidation can be triggered in two ways:

- For the context menu (right click), simply closing the menu and right clicking somewhere else solves the problem. The context menu is thus misplaced only once after reconfiguring the monitors (unless one right clicks again at the exact same position)

- For the bookmarks and search menus, one has to move the window by a few pixels in order to get rid of the problem. However, it is necessary to open each menu once before moving the window to get rid of the problem for that particular menu. For instance with two bookmarks menus, after reconfiguring the screens I open the first one, it is misplaced. Then I move the window and open the first menu again, then it is correctly placed. However if after that I open the second menu, it is also misplaced. I have to move the window again to fix it. On the other hand, if after reconfiguring the screens I open both menus (both are then misplaced) and then move the window, after that both menus are correctly placed.

Revision history for this message
gpothier (gpothier) wrote :

This is still an issue in 18.04 and can be reproduced from the live image.

Steps to reproduce:
0. Use a laptop with high resolution display (eg. 3200 x 1800).
1. Boot from live image with external monitor plugged in.
2. Launch Firefox and enable the bookmarks toolbar.
3. Open and close the first item in the toolbar (or any other menu actually) => no problem.
4. Open the display configuration app and change config, eg. change scale from 200% to 100%, or change built in display's resolution to 1900 x 1080.
5. Open the first item in Firefox's bookmarks toolbar => it usually appears at wrong location. If not, try disconnecting the external monitor and opening the menu. At some point it will appear at the wrong location.

Revision history for this message
In , gpothier (gpothier) wrote :

Following up on this report: this bug is 100% reproducible with the Ubuntu 18.04 Live usb image, so it is not a configuration/package issue on my system.

Steps to reproduce:
0. Use a laptop with high resolution display (eg. 3200 x 1800).
1. Boot from live image with external monitor plugged in.
2. Launch Firefox and enable the bookmarks toolbar.
3. Open and close the first item in the toolbar (or any other menu actually) => no problem.
4. Open the display configuration app and change config, eg. change scale from 200% to 100%, or change built in display's resolution to 1900 x 1080.
5. Open the first item in Firefox's bookmarks toolbar => it usually appears at wrong location. If not, try disconnecting the external monitor and opening the menu. At some point it will appear at the wrong location.

Revision history for this message
In , gpothier (gpothier) wrote :

I did a bisection and found that the problem started appearing here:

13:29.43 INFO: Last good revision: 8e5c888d0d89 (2015-07-22)
13:29.43 INFO: First bad revision: 1f77b78797d6 (2015-07-23)

I think it has to do with DPI handling, as in the last good revision the whole UI appears very small on the laptop's built in high DPI display, and in the first bad revision it seems work was being done to address this. Unfortunately I could not go deeper than nightlies:

18:02.59 INFO: There are no build artifacts on inbound for these changesets (they are probably too old).

Paul White (paulw2u)
tags: added: bionic
Revision history for this message
In , kmare (pioann) wrote :

I've been having the same problem for a while. It is exactly as gpothier described. It is really an annoyance as the only way to get back to work normally, is to basically quit Firefox and start it up again.
I'm using Fedora 28, but the problem was the same on Fedora 27. I tested Fedora 29 too. Would be really nice to have to bug fixed at some point. If can provide any more info about the problem, please let me know.

Revision history for this message
In , Stergios-mekras (stergios-mekras) wrote :

I have the same problem in both Fedora 29 and Ubuntu 18.04. Would really appreciate a fix.

Changed in firefox:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Alireza Haghshenas (alirezahaghshenas) wrote :

I have the same problem:
Firefox 95.0.2 (64-bit)
Operating System: Fedora Linux 35
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.10-200.fc35.x86_64 (64-bit)
Graphics Platform: Wayland

Monitors:
Frame.work laptop (2256*1504@100%)
Dell 32"4k@150%

The right click menu in many pages including Google search results are not shown, but are there somehow. So if I press escape to close the invisible menu and right-click again and repeat this several times, the context menu will eventually be shown.

Changed in firefox:
importance: Medium → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.