Automattic / Automattic/antiscroll
Scroll Isolation
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
**Feedback** Seems nice! I give it a try!
**Feature Request** Wouldn't it be perfect if we could set that param which won't allow scroll bubbling? _(e.g. Facebook where the chat window must be scrollable without the whole site is scrolling away when reached the bottom of the chat window)_
``` coffee
#prevent scroll bubbling on .scroll-isolated
#using 'jquery-mousewheel' (git repository)
$( ".scroll-isolated" ).each ->
$( @ ).on "mousewheel", ( e, dlta ) ->
st = $( @ ).scrollTop()
if ( !st and dlta > 0 ) or st is ( @scrollHeight - $( @ ).height() ) and dlta < 0 then e.preventDefault()
```
**Update** Switched to _jquery.nicescroll_ !! Great plugin, no css file needed and scroll isolation implemented (nativeparentscrolling: !1)
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the issue's mousewheel snippet and the jquery.nicescroll update first. Confirm whether scroll isolation is already covered by nativeparentscrolling: !1, then identify the repository entry point that handles scrolling. Done means the isolated area remains scrollable without bubbling at either boundary, with no regression to ordinary scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100