I would reckon that the scrollstart event should only fire once an actual movement has begun - as it is now the scrollstart fires immediately on touchstart.
we would probably need both events. As of now scrollStart is actually touchStart (not entirely true but still...). In my experiments having an event before the scroll actually initiates is more useful than one that fires once the scroll already started
The issue at the moment is that taps on an iScroll-enabled pane trigger a scrollStart, which is unexpected.
Maybe there should be a 5px radius before scrollStart fires. This is similar to what I use for my own "tap" event implementation, but in reverse (i.e. if pointer moves more than 5px in any direction, it isn't a tap).
I second that. I have practical example/problem with this at the moment. On scrollStart I make my top and bottom bars fade out and on scrollEnd fade back in and it works great. Until someone actually just taps on a slider button instead of scrolling whole container. At that moment scrollStart fires and header/footer disappear, but never appear back, cause scrollEnd never fires. It's just logic problem, as you expect it actually start on scroll not tap. So @brianblakely is probably right, there should be some kind of few px tracking before it fires scrollStart, and just touchStart before that.
Sorry for lengthy explanation. Really looking forward to this fix :] Until then back to JQ Mobile "scrollstart"...
okay this is very problematic as it is going to break current code. I have to think a nice way of doing it. I probably should keep scrollstart as it is now and add a new event (scrollStartThreashold or something) for when you start moving.
"okay this is very problematic as it is going to break current code."
Well, it IS a beta, right? :)
well, technically we are out of beta
Anyone have a fix or hack for this yet? Really debilitating to not be able to capture the true scroll start event
I'll be working on iScroll in the next couple of days. I'll do my best to fix as time permits
This is what I do, I don't use 2way scrolling so I dont know how it goes for it. But for vertical and horizontal (even nested) works:
Hope it helps
fix #439 #488 #517 #428 #270 #520 #447 #452 #509
scrollStart has become beforeScrollStart, now scrollStart should be initiated when the scrolling actually starts
Thanks for this fix! Much appreciated!
On Oct 29, 2013, at 7:03 PM, "Matteo Spinelli" <email@example.com:firstname.lastname@example.org> wrote:
Reply to this email directly or view it on GitHubhttps://github.com/cubiq/iscroll/issues/428#issuecomment-27352019.