Angular select scroll event not fired

2.3k views Asked by At

I created an example here. I created a directive that binds to the scroll event and puts the directive in a select. However, the scroll event never fires!

I also created a jquery version and it works!. Can some one tell me how to listen to a scroll event of select and ng-options? Thanks!

1

There are 1 answers

2
hpatel On

Just copied style

style="overflow:scroll" size=5

from your second select and pasted in your first select, and it worked.

<select ng-model="n" ng-options="number for number in users" scrolly style="overflow:scroll" size=5>
  <option value="">--pick a number--</option>
</select>

This post could have helped you:Scroll event is not fired inside directive - angular.js

See the screenshot, the code example you created is working in chrome. enter image description here