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

fix: group name is not set after reordering a tab #313

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

sebastienfontaine
Copy link
Contributor

@sebastienfontaine sebastienfontaine commented Jun 22, 2024

The onMoved event triggers when a tab is moved, but the user might still be holding the tab (dragging), which generates this error:

Unchecked runtime.lastError: Tabs cannot be edited right now (user may be dragging a tab).

To work around this, I retry the call with the Chrome API every 100ms as long as runtime.lastError is set.

I have also added a maximum of 600 retries, equivalent to a maximum wait time of 1 minute. Therefore, if a user holds a tab for more than a minute, the rule will not apply.

@sebastienfontaine sebastienfontaine self-assigned this Jun 22, 2024
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.

Group name is not set after reordering a tab
1 participant