Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection.anchorOffset should return 0 instead of null according to the spec #1163

Closed
seanogdev opened this issue Nov 19, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@seanogdev
Copy link
Contributor

Describe the bug
Trying to migrate to happy-dom and our test presumes that if the anchorNode is null, then the anchorOffset is 0
To Reproduce

Steps to reproduce the behavior:
https://w3c.github.io/selection-api/#dom-selection-anchoroffset

Expected behavior
It matches spec

Screenshots
If applicable, add screenshots to help explain your problem.

Device:

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@seanogdev seanogdev added the bug Something isn't working label Nov 19, 2023
capricorn86 added a commit that referenced this issue Jan 15, 2024
#1163@patch: Selection anchorOffset should return a number.
@capricorn86
Copy link
Owner

Thank you again for your contribution @seanogdev!

Your fix has been released:
https://github.com/capricorn86/happy-dom/releases/tag/v13.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants