Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack: Periodically re-create context menus in Firefox #127

Merged
merged 1 commit into from Apr 16, 2024

Conversation

yorkxin
Copy link
Owner

@yorkxin yorkxin commented Apr 16, 2024

Summary

In Firefox, when context menus were created in MV3, they may disappear unintentionally, even after restart. This is due to a bug in Firefox 1.

This patch introduces a hack which removes and re-creates all the menus every 30 seconds.

Related: #109

Tests

  • Chrome stable (macOS)
  • Firefox stable (macOS)
  • Chrome stable (Windows)
  • Firefox stable (Windows)

Optional:

  • Chrome beta (macOS)
  • Firefox beta (macOS)
  • Chrome beta (Windows)
  • Firefox beta (Windows)

In Firefox, when context menus were created in MV3, they may disappear
unintentionally, even after restart. This is due to a bug in Firefox [1].

This patch introduces a hack which removes and re-creates all the
menus every 30 seconds.

[1]: https://discourse.mozilla.org/t/strange-mv3-behaviour-browser-runtime-oninstalled-event-and-menus-create/111208/7
@yorkxin yorkxin changed the title Hack: Periodically re-create context menus Hack: Periodically re-create context menus in Firefox Apr 16, 2024
@yorkxin
Copy link
Owner Author

yorkxin commented Apr 16, 2024

The menus have once disappeared in some tabs without appearing again. Refreshing the tab and the menus are back, but only in that specific tab.

@yorkxin yorkxin merged commit 8096165 into master Apr 16, 2024
1 check failed
@yorkxin yorkxin deleted the firefox-contextmenu-hack branch April 16, 2024 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant