-
Notifications
You must be signed in to change notification settings - Fork 17
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
Polyfill is not applied in Edge 87 & Chrome 87 (Windows 10) #16
Comments
I've managed to force apply the polyfill the following way:
But I really don't like it. |
It would be even cooler if I can do something like that:
|
By chance, is there a better way to detect when the polyfill is really required? It seems like the The home readme may also be a bit misleading: it's more reliable to always apply the polyfill in current state. |
Nolan Lawson used another way to test for this in his project but in my case it didn't give much better results: nolanlawson/pinafore#2082 function testSupportsSmoothScroll () {
let supports = false
try {
const div = document.createElement('div')
div.scrollTo({
top: 0,
get behavior () {
supports = true
return 'smooth'
}
})
} catch (err) {} // Edge throws an error
return supports
} |
Thanks for this awesome polyfill! Great job!
I've encountered a problem. Sometimes polyfill is not applied because these two checks return
true
......while the smooth scrolling doesn't work.
What do you think about providing a way to force apply the polyfill? For example, by prepending the polyfill import with
window.forcePolyfillScrollBehavior = true;
.The text was updated successfully, but these errors were encountered: