DEV: adds pointerup event to our select text helper (#1429)

This is needed for https://github.com/discourse/discourse/pull/33143

Ideally we should move all these helpers to core, or improve the ones in core.
This commit is contained in:
Joffrey JAFFEUX 2025-06-12 10:33:14 +02:00 committed by GitHub
parent ed311de937
commit b5a2ee31ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,6 +78,8 @@ acceptance("AI Helper - Post Helper Menu", function (needs) {
const selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
const event = new PointerEvent("pointerup");
document.dispatchEvent(event);
await settled();
}