[Webkit-unassigned] [Bug 40787] New: "mousewheel" event wheelDelta incorrectly delivers horizontal scroll deltas

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 17 10:10:03 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40787

           Summary: "mousewheel" event wheelDelta incorrectly delivers
                    horizontal scroll deltas
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Minor
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: natevw at yahoo.com


The wheelDelta property of events delivered to a "mousewheel" listener incorrectly deliver horizontal (x-axis) scroll deltas when no vertical scroll occurred. This violates the W3C spec for legacy MouseWheelEvents (http://www.w3.org/TR/DOM-Level-3-Events/#events-Events-MouseWheelEvent-wheelDelta).


To reproduce:
1. Load a web page, and enter the following into the JavaScript console:
document.addEventListener("mousewheel", function(e) { console.log(e.wheelDelta, e.wheelDeltaY, e.wheelDeltaX); });
2. Scroll vertically, diagonally and horizontally on the web page (using a MacBook trackpad or similar 2-axis continuous scrolling device)

Expected results:
A small vertical scrolls yields "75 75 0"
A small diagonal scroll yields "55 55 45"
A small horizontal scroll yields "0 0 75"
That is: e.wheelDelta ==  e.wheelDeltaY at all times.


Actual results:
A small vertical scrolls yields "75 75 0"
A small diagonal scroll yields "55 55 45"
A small horizontal scroll yields "75 0 75"
That is: e.wheelDelta == (e.wheelDeltaY || e.wheelDeltaX). This is incorrect.


Workaround:
The bad side effects of this behaviour can be avoided by checking mousewheel events for the e.wheelDeltaY property and using that instead of e.wheelDelta when the former is present.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list