Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Prevent page from scrolling, when scrolling inside selection #832

Open
rapmue opened this issue Apr 8, 2015 · 6 comments
Open

Prevent page from scrolling, when scrolling inside selection #832

rapmue opened this issue Apr 8, 2015 · 6 comments

Comments

@rapmue
Copy link

rapmue commented Apr 8, 2015

I was thinking, if it makes sense to have an option, where you can specify what happens, when you reach the end of the selection list while scrolling with the mousewheel.

The default behavior is, to scroll the whole page. But sometimes it could be nice to prevent the default behavior.

I came accross this example where you see on the left, the expected behavior, if the default behavior is prevented.

Maybe this will also be interesting, if there is the ability for infinity scrolling in near future. i.e #221 , #620

@mgamer
Copy link

mgamer commented Apr 20, 2015

I second that, the current behaviour is pretty annoying and suggestion made by @rapmue would solve it in an elegant way.

@emmanueldaher
Copy link

emmanueldaher commented May 18, 2015

hello guys @rapmue and @mgamer , i've been working in pure angular projects and I had the same problem with whole page scrolling, and the jQuery solution doesn't fit well on my projects, so I created an angular very tiny directive to solve this problem in any html element: http://jsfiddle.net/eXQf3/1135/, then you can use this directive in the "ui-select-choices" directive.

@itamarki, I've updated the jsfiddle with your solution.

@emmanueldaher
Copy link

Resolved! #940

@dasaanudeep
Copy link

@emmanueldaher Thanks for your solution its working great.

@itamarki
Copy link

itamarki commented Jul 5, 2017

@emmanueldaher Thanks for the directive. event mousewheel is not recognized in FireFox, I changed it to event wheel and it works (tested in Edge, Chrome, FF)

@emmanueldaher
Copy link

All of you, do you think maybe I should a git with bower/yarn package for this directive? Do you think it is usefull?

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

No branches or pull requests

6 participants