You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
I tried the simple codepen but it works correctly both on my PC running Edge and on my mac running Safari. I'll add more context to the codepen to find when the incompatibility occurs.
I worked around the problem by adding a setTimeout() with a time-out function that calls document.onselectionchange() if document.onselectionchange() hasn't been called by 100 msec after the setBaseAndExtent() call.
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
api.Document.selectionchange_event
The text was updated successfully, but these errors were encountered: