scrollyfills icon indicating copy to clipboard operation
scrollyfills copied to clipboard

window event listener with capture=true doesn't fire for internal elements in Safari

Open xkill-9 opened this issue 1 year ago • 1 comments

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

xkill-9 avatar Jun 09 '24 20:06 xkill-9

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.

argyleink avatar Jun 10 '24 20:06 argyleink