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

Context menus disappear #20

Closed
chunibyocola opened this issue Aug 5, 2021 · 2 comments
Closed

Context menus disappear #20

chunibyocola opened this issue Aug 5, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@chunibyocola
Copy link
Owner

In Chrome91~92, context menus will disappear in some case.

@chunibyocola chunibyocola added the bug Something isn't working label Aug 5, 2021
@chunibyocola
Copy link
Owner Author

This issue can be caused by the follow steps:

  1. Allow this extension in incognito mode.
  2. Open a new incognito page.
  3. Context menus disappear.

It is not a issue in other extensions.
I will figure out a way to fix this bug.

@chunibyocola chunibyocola pinned this issue Aug 5, 2021
@chunibyocola
Copy link
Owner Author

This bug caused by chrome.contextMenus.removeAll().

Seems like in incognito mode, the context menus are created after chrome.contextMenus.removeAll() will not work in the normal mode. But the chrome.contextMenus.removeAll() in incognito mode will remove normal mode's context menus.

This doesn't make sense. It might be a Chromium bug here.

To keep the same experience as before, I fixed it through duplicate create/remove. There is a better way to fix it by contextMenu.visible, but there will be a wrapper even if there is only a single menu. Will be switch to "contextMenu.visible" if the "duplicate create/remove" cause bugs.

@chunibyocola chunibyocola unpinned this issue Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant