Skip to content

Conversation

@vitonsky
Copy link
Member

@vitonsky vitonsky commented Jul 23, 2025

Fixes #395

Problem

We have single context menu for all tabs and dynamically update it when user toggle/refresh tab.

While this update we fetch content script for state of page translation and sometimes it happens too quickly, so content script is not ready to response for requests.

This lead us to an exception and catch block is hide context menu in result.

How this change fixes it

Implemented retries mechanism for query content script.

Now background script can wait response (with reasonable deadline time).

@vitonsky vitonsky linked an issue Jul 23, 2025 that may be closed by this pull request
@vitonsky vitonsky merged commit 77e7ad4 into master Jul 23, 2025
7 checks passed
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.

Context menu item "Translate page" is sometimes not displayed

2 participants