hypothesis / hypothesis/browser-extension
Deactivating extension can remove embedded Hypothesis
- Dominant language
- JavaScript
- Stars
- 553
- Forks
- 141
- PR merge metrics
- No merged PRs in 30d
Description
The browser extension has some logic so that activating it on a page which already embeds Hypothesis does not result in the extension's copy of the sidebar being run alongside the embed. This is handled by canceling activation if an embedded client is detected in the page.
De-activating the extension however does not perform the counterpart check to see whether it is the extension's copy of the client that is loaded into the page.
We should make the behaviour more consistent. A caveat is that the current behaviour may be useful since it allows the embed to be replaced with the extension in a roundabout way so we might want to think twice before just preventing the extension ever being used on a page that embeds the client.
**Steps to reproduce**
1. Go to a page that embeds Hypothesis
2. Activate the extension
3. De-activate the extension
**Expected result**
If step (2) does not _replace_ the embed, then step (3) should not _remove_ the embed.
**Actual result**
Step (2) does not _replace_ the embed but step 3 does _remove_ it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.