hypothesis / hypothesis/client

Can't annotate https://community.canvaslms.com/ (issue with tsParticles)

Open
#6,210 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Mustache
Stars
730
Forks
224
PR merge metrics
No merged PRs in 30d

Description

**Steps to reproduce:**

1. Activate the Hypothesis browser extension on https://community.canvaslms.com/t5/Canvas-Studio-Blog/Connecting-Studio-OAuth-via-Postman/ba-p/259739
2. Select text

**Expected:** Annotate/Highlight toolbar appears
**Actual:** Toolbar does not appear. Browser console shows an error:

```
html.ts:135 Uncaught TypeError: n.setStart is not a function
at Bn.toRange (text-range.ts:292:11)
at Bn.trimmedRange (text-range.ts:325:49)
at Zi.getAnnotatableRange (html.ts:130:24)
at dr._onSelection (guest.ts:818:48)
at guest.ts:289:14
at selection-observer.ts:30:9
```

On this page the `Range` global has been overwritten with a different object which doesn't have the expected API. The problem is caused by the script https://cdn.jsdelivr.net/npm/tsparticles-confetti@2.9.3/tsparticles.confetti.bundle.min.js. Using Chrome devtools to block this script when the page loads prevents the problem from occurring. The issue also occurs on the home page of the tsParticles library - https://particles.js.org.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.