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

:target pseudo-class is not toggled #20

Open
jonaskuske opened this issue Feb 1, 2019 · 0 comments
Open

:target pseudo-class is not toggled #20

jonaskuske opened this issue Feb 1, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@jonaskuske
Copy link
Owner

jonaskuske commented Feb 1, 2019

When the polyfill updates the URL through pushState(), CSS pseudo-classes like :target are not updated accordingly.
This is actually a browser bug as the spec is very clear about this, but we can maybe still work around it by setting location.hash after the scroll is completed (so it doesn't interrupt the smoothscroll), similar to pendingFocusChange – shouldn't be visible at all, as the hash was updated by history.pushState before already, but hopefully it force-updates :target CSS classes etc.

@jonaskuske jonaskuske added the bug Something isn't working label Feb 1, 2019
@jonaskuske jonaskuske added this to the v1.3.1 milestone Sep 24, 2019
@jonaskuske jonaskuske removed this from the v1.3.2 milestone Nov 23, 2021
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

1 participant