History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-14372
Type: Bug Bug
Status: Closed Closed
Resolution: Deferred
Priority: C C
Assignee: Ryan Frishberg
Reporter: Ryan Frishberg
Votes: 3
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Flex SDK

MouseWheel handling doesn't deal with zero delta values correctly

Created: 01/16/08 05:52 PM   Updated: 02/25/08 05:24 PM
Component/s: mx: General
Security Level: Public (All JIRA Users )

Issue Links:
Duplicate
 
This issue is duplicated by:
SDK-14771 Track Pad Scrolling is not supported ... None Closed
SDK-14605 It doesn't seem possible to handle ho... None Closed

Severity: Incorrectly Functioning
Reproducibility: Every Time
Discoverability: Medium
Found in Version: SDK Flex 3 (Released)
Affected OS(s): All OS Platforms
Steps to Reproduce:
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

 
 
 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Joan Lafferty
Resolved by: Lauren Park
Participants: Joan Lafferty, Lauren Park, Ryan Frishberg and Sean Christmann


 All   Comments      Sort Order:
Lauren Park - [01/17/08 12:24 AM - edited ]
See SDK-1124. Note that the player bug to implement scroll wheel support for the Mac is open for FP10. Player bug 178147

Joan Lafferty - [01/18/08 01:53 PM - edited ]
The player doesn't support using a Mac scrollwheel yet. If/when the player has full support for mousewheel scrolling in Mac, then, we'll support it. There is a player bug open, so, this is definitely on their radar.

Sean Christmann - [01/18/08 02:29 PM ]
Sorry I don't see any comment from Lauren. This occurs in AIR, and the mouse trackpad 2 finger scrolling is absolutely supported there, I'm looking at it working right now :)

Joan Lafferty - [01/24/08 02:05 PM - edited ]
I reproduced this bug with our mainline SDK 3.0.255. When you scroll with the trackpad on Mac, you get zeros most of the time. This doesn't seem to affect downward scrolling in the WindowedApplication, however, when attempting to scroll up from the bottom, the WindowedApplication doesn't scroll up whenever the delta is zero. This scrolling is pretty messed up.

My opinion is that the player should not be sending us back a delta of zero. If this is not a bug on the player side, then, we should handle scrolling in our app if the delta is zero. I will file a separate bug with the player about the zero issue.

Sending back to Internal Review for deferral since this won't get fixed on this Moxie release.

More info - This seems to only reproduce in AIR. With a regular application in the Standalone player, the delta is never a 0. When running in Firefox, this scrolling doesn't even work (probably the player limitation that is on their radar already).

Joan Lafferty - [01/25/08 01:05 PM ]
AIR bug #1674798 was filed.

Lauren Park - [01/30/08 03:59 PM ]
AIR bug is deferred until 1.1.