api.Document.selectionchange_event - Safari incompatibility
Nobody has claimed this yet.
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
What type of issue is this?
Browser bug (a bug with a feature that may impact site compatibility)
What information was incorrect, unhelpful, or incomplete?
Calling setBaseAndExtent() doesn't fire a selection-change event in Safari
What browsers does this problem apply to, if applicable?
Safari
What did you expect to see?
Expected document.onselectionchange() to be called. It is called in Chrome, Edge, Firefox after setBaseAndExtent() is called.
Did you test this? If so, how?
Commit 334f4bdf of https://github.com/MurrayIII/UnicodeMathML has the if statement that fixes the problem in Safari. Basically when navigating a math expression in the output window using right arrows (run the playground demo), some speech was missing in Safari. Calling document.onselectionchange() explicitly after calling setBaseAndExtent() fixes the problem in Safari.
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
No response
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/Document/selectionchange_event
MDN metadata
MDN page report details
- Query:
api.Document.selectionchange_event - Report started: 2025-01-22T15:21:17.882Z
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the api.Document.selectionchange_event entry and compare its Safari compatibility data with the reported behavior. Reproduce the setBaseAndExtent() case using the linked UnicodeMathML playground or commit 334f4bdf, then update the entry so it reflects the verified Safari behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100