scrollyfills
scrollyfills copied to clipboard
window event listener with capture=true doesn't fire for internal elements in Safari
I was trying to use the polyfill for a hook that listens for global scrollend events, but the polyfill doesn't seem to work for this particular use case in Safari.
Is easy to repro, I added a div with a scrollbar to the demo code and you can see that the event doesn't fire when you stop scrolling in it but it does for the document-wide scrollbar.
CodeSandbox link: https://codesandbox.io/p/sandbox/scrollyfills-capture-cnt4kp
confirm the issue you're looking at, and i think the issue is that the polyfill only emits synthetic events for elements you've told it about / registered listeners with.