Reported by customer. The issue seems to be mostly Mac specific (I don't have a Mac to investigate much), but when using the trackpad, apparently Flash gives us mouseScroll events with a delta is 0. We automatically round these up to 1 and interpret it as scrolling down. One question is why do we interpret it as a scroll down (versus a scroll up...is this just a good default?). Also, why do we get an event with a delta of zero in the first place (this seems a little odd to me). Lastly, why do we even do anything with a zero?
The "semi-offending" code is in Container and ScrollContraolBase:
function mouseWheelHandler(){
var scrollDirection:int = event.delta <= 0 ? 1 : -1; // why intepret this direction when 0?
var scrollAmount:Number =
Math.max(Math.abs(event.delta), lineScrollSize); // why round up?
}
This is not a regression. If deemed a Flex bug (and not a Flash issue), the workaround would be to override the mouseWheelHandler. However, you can only do this for ScrollControlBase (not Container) because in one it's protected and in the other it's private (this should be fixed as they should both be the same level).
---------------------------
Scrolling on the mac trackpad is extremely problematic unless users scroll really fast
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="
http://www.adobe.com/2006/mxml" layout="absolute" height="200" mouseWheel="trace(event.delta)">
<mx:Canvas height="1000"/>
</mx:WindowedApplication>
The reason why is because a standard scrollwheel always contains fully positive or fully negative integers to scrollby, whereas the mac trackpad reports alot of 0 values as the delta data which the flex scroll mechanism is using to scroll a field downward.
For instance, i ran the example above and scrolled the field to the bottom, then using the trackpad i tried to scroll back upwards. Here is teh delta data output by the trace
0
2
0
0
0
0
0
0
0
4
0
0
0
The scrollbar jumped up slightly then jumped back down the very bottom. Flex was interpretting the zeros as a downward scroll and canceling out any positive scroll numbers
SDK-1124. Note that the player bug to implement scroll wheel support for the Mac is open for FP10. Player bug 178147