Skip to content
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

Scroll Isolation #95

Open
faeb187 opened this issue Jul 9, 2015 · 0 comments
Open

Scroll Isolation #95

faeb187 opened this issue Jul 9, 2015 · 0 comments

Comments

@faeb187
Copy link

faeb187 commented Jul 9, 2015

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)

#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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant