AngularJS directive for a user agreement view, detect enabling button, does not work on mobile safari AngularJS directive for a user agreement view, detect enabling button, does not work on mobile safari angularjs angularjs

AngularJS directive for a user agreement view, detect enabling button, does not work on mobile safari


Scroll events don't work on mobile as they work on the desktop. In essence, the scroll event is only fired at the end of the scroll. See this:

http://andyshora.com/mobile-scroll-event-problems.html


As Mark said, scroll event is a problem on mobile - especially in older iOS devices as they pause JS execution during scrolling. It is partially fixed in IOS 8, by partially I mean that problem is fixed in safari, but not in webview (nor in any other browser running on iOS).

Android invokes it a suppressed rate, as scroll is async in chrome. DOM manipulation/repainting lags even more - but it will still work correctly for your case.

To solve the problem you are having, all you can do is to setup timer/interval (well for <iOS 8 in safari or in webview/cordova <iOS 9) and inspect scrollTop property. Or you have to change your design, e.g. so that user would have to scroll all the way down to see 'close' button.