argyleink / argyleink/scrollyfills
window event listener with capture=true doesn't fire for internal elements in Safari
- Dominant language
- JavaScript
- Stars
- 124
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the polyfill behavior described in the issue and reproduce it in Safari using the linked CodeSandbox demo. Compare scrolling the document-wide scrollbar with the inner div scrollbar and trace why the capture listener differs. Done means the polyfill fires the global scrollend event for the internal scrollable element as well as the document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100