Open Bug 1787116 Opened 2 years ago Updated 2 years ago

[Sway] Context menu actions do no work

Categories

(Core :: Widget: Gtk, defect)

Firefox 105
defect

Tracking

()

UNCONFIRMED

People

(Reporter: pavkfr, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0

Steps to reproduce:

context menu actions like: duplicate tab, close tab, inspect, etc do not work.

Actual results:

Nothing.

Expected results:

Context menu actions to work.

The Bugbug bot thinks this bug should belong to the 'Firefox::Menus' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Menus

We're going to need some more details here - they work fine for me. Some questions:

  1. some of these are tab context menu, some web content context menu options - do no options work in any of these menus? What about the toolbar context menu or url bar context menu?
  2. are you selecting items by mouse or keyboard? If one, try the other, does it make a difference?
  3. did this work on a previous version of Firefox? Are you using developer edition or beta?
  4. you reported this on Linux - what window manager and distro are you using?
  5. is this an official mozilla.org build of Firefox or a distro-provided one?
  6. any errors in the browser console (NOT the regular developer tools one - the browser one, opened with ctrl-shift-J) when clicking these no-action context menu items?
Flags: needinfo?(pavkfr)

Hi, sorry for the lack of details in the initial post.

  1. Browser's context menu do not work. Custom website context menu options that replace the browser's default context menu (like when you right click on a youtube video) are working. Toolbar (the burger button next to the extension icons?) and the url bar's is working.
  2. There is no difference between keyboard and mouse click event.
  3. It stopped working a couple of weeks ago. I recently switched to ff developers edition. When I made the switch, the context menus were working correctly. I'm using ff developers edition.
  4. I'm on arch + wayland + swaywm. I'm also using a 3rd party GTK theme and these env variables related to ff:
    MOZ_ENABLE_WAYLAND=1
    MOZ_DBUS_REMOTE=1
  5. Its a distro provided on the official community repo of arch (not AUR).
  6. Every context menu action throws the following error:
    Uncaught TypeError: can't access property "inspectNode", gContextMenu is null
    oncommand chrome://browser/content/browser.xhtml:1
Flags: needinfo?(pavkfr)

To clarify #3

Initially when i made the switch to ff developers edition context menus were working correctly. Some package updates later the issue appeared. I don't know which version broke the context menus because I recently purged my package manager's cache.

(In reply to pavkfr from comment #3)

Hi, sorry for the lack of details in the initial post.

  1. Browser's context menu do not work. Custom website context menu options that replace the browser's default context menu (like when you right click on a youtube video) are working. Toolbar (the burger button next to the extension icons?) and the url bar's is working.
  2. There is no difference between keyboard and mouse click event.

Just to 100% be sure: is this also true if you bring up the menu using the keyboard entirely (with shift-f10 on a link, for instance) ? Trying to exclude mouse interaction events from being the culprit here...

  1. It stopped working a couple of weeks ago. I recently switched to ff developers edition. When I made the switch, the context menus were working correctly. I'm using ff developers edition.
  2. I'm on arch + wayland + swaywm. I'm also using a 3rd party GTK theme and these env variables related to ff:
    MOZ_ENABLE_WAYLAND=1
    MOZ_DBUS_REMOTE=1
  3. Its a distro provided on the official community repo of arch (not AUR).

OK, could you try if you see the same with the official builds ( https://www.mozilla.org/en-GB/firefox/channel/desktop/#developer ) ?

If you can reproduce with those, you could try using mozregression ( https://mozilla.github.io/mozregression/ ) to find out when it broke. Although:

Initially when i made the switch to ff developers edition context menus were working correctly. Some package updates later the issue appeared. I don't know which version broke the context menus because I recently purged my package manager's cache.

I'm not sure if I'm reading this right, but if you're also updating other (non-Firefox) packages, is it possible one of those updates triggered this? That would likely be difficult to debug...

  1. Every context menu action throws the following error:
    Uncaught TypeError: can't access property "inspectNode", gContextMenu is null
    oncommand chrome://browser/content/browser.xhtml:1

Hm, well, that's no good. If you restart the browser, are there any errors in the browser console straight after the browser starts, or perhaps the very first time you open the context menu, that seem related to the context menu? If gContextMenu is null, it sounds like something strange is happening with its initialization, maybe... either way we need to understand why that thing is null...

Flags: needinfo?(pavkfr)
Attached image ff_console.png (deleted) —

this is the console output when launching firefox in troubleshoot mode.

Flags: needinfo?(pavkfr)

(In reply to :Gijs (he/him) from comment #5)

Just to 100% be sure: is this also true if you bring up the menu using the keyboard entirely (with shift-f10 on a link, for instance) ? Trying to exclude mouse interaction events from being the culprit here...

The issue persists. The console error is the same.

OK, could you try if you see the same with the official builds ( https://www.mozilla.org/en-GB/firefox/channel/desktop/#developer ) ?

If you can reproduce with those, you could try using mozregression ( https://mozilla.github.io/mozregression/ ) to find out when it broke. Although:

The official build is working fine.

I'm not sure if I'm reading this right, but if you're also updating other (non-Firefox) packages, is it possible one of those updates triggered this? That would likely be difficult to debug...

I update my system on daily basis. One "big" changes I made recently is swapping from official mesa to mesa-git

Hm, well, that's no good. If you restart the browser, are there any errors in the browser console straight after the browser starts, or perhaps the very first time you open the context menu, that seem related to the context menu? If gContextMenu is null, it sounds like something strange is happening with its initialization, maybe... either way we need to understand why that thing is null...

I'm also experiencing the same issue with my laptop which is running the same configuration as I described in #4 but uses the distro provided mesa package.

Context menu actions on page: back, forward and reload are working. The rest aren't.

Context menu actions on url bar are working.

Context menu actions on favorites bar aren't working.

Context menu actions between the url bar and the navigation buttons are working.

When trying to pin a button to the overflow menu, the console error is different:
TypeError: can't access property "ownerDocument", aNode is null

When clicking to Open All Bookmarks context menu action, the console error is different:
Uncaught TypeError: can't access property "closest", event.target.parentNode.triggerNode is null

When clicking the context actions: Add Bookmark, Add Folder, Add Separator nothing happens but there are no console errors.

All three Bookmarks Toolbar's submenu options, Show Other Bookmarks and Manage Bookmarks are working as expected.

(In reply to pavkfr from comment #7)

OK, could you try if you see the same with the official builds ( https://www.mozilla.org/en-GB/firefox/channel/desktop/#developer ) ?

If you can reproduce with those, you could try using mozregression ( https://mozilla.github.io/mozregression/ ) to find out when it broke. Although:

The official build is working fine.

In that case, it's quite possible that this is a bug in how the package mantainers have build Firefox for that distribution. I'm going to needinfo stransky just in case this is at all related to recent Wayland work, but I'm going to suspect that you'll want to file the bug on the distribution's bug tracker.

Hey stransky! Am I correct in thinking that this is likely a packager bug to be filed in the downstream bug tracker?

Flags: needinfo?(stransky)

Please on latest nightly do:

  1. attach your about:support page
  2. try mutter Wayland compositor (https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_different_Wayland_compositor)

Thanks.

Blocks: wayland-sway
Flags: needinfo?(stransky) → needinfo?(pavkfr)
Priority: -- → P3
Summary: Context menu actions do no work → [Sway] Context menu actions do no work

Moving this over to widget land as this doesn't look like it'll be a frontend issue.

Component: Menus → Widget: Gtk
Product: Firefox → Core

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: