Aayla Secura
Aayla Secura

Reputation: 475

WheelEvent deltaX/Y and resulting scroll direction

I know this has been asked before but there's no definitive answer on that question.

MDN says:

Even when the wheel event does trigger scrolling, the delta* values in the wheel event don't necessarily reflect the content's scrolling direction.

However, the spec says:

If a user agent scrolls as the default action of the wheel event then the sign of the delta SHOULD be given by a right-hand coordinate system where positive X, Y, and Z axes are directed towards the right-most edge, bottom-most edge, and farthest depth (away from the user) of the document, respectively.

And the full-page example in this question that reported the opposite behaviour in Edge seems to now give expected sign of delta* suggesting it indeed was a bug that was fixed in Edge.

Also, on a discussion about this on Bugzilla, a comment by a representative, suggests that the spec is clear and that the sign of delta* should indeed indicate the direction of the resulting (if any) scroll event in the expected way (negative deltaX means left, positive means right; negative deltaY means down, positive means up).

So my questions are:

Upvotes: 1

Views: 76

Answers (0)

Related Questions