This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25323 - "fire an event named scroll" use UIEvent?
Summary: "fire an event named scroll" use UIEvent?
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-11 10:36 UTC by Simon Pieters
Modified: 2016-03-14 15:33 UTC (History)
4 users (show)

See Also:


Attachments

Description Simon Pieters 2014-04-11 10:36:12 UTC
http://dev.w3.org/csswg/cssom-view/#scrolling-0

[[
fire an event named scroll
]]

Gecko uses UIEvent for scroll. http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2937
Comment 1 Arkadiusz Michalski (Spirit) 2014-04-11 12:33:35 UTC
I just wanted to add that in IE we have other behavior. Simple comparison: 

- Chrome always use Event
- Firefox use UIEvent only for scroll event.  << according D3E it should also be resize (https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#event-type-resize)
- IE use UIEvent for select, resize and scroll.

More detail https://bugzilla.mozilla.org/show_bug.cgi?id=992703.

Next problem is that when event is generated directly from UI then can be UIEvent interface. But sometimes we can make some synthetic action from script (using dedicated method) and how interpretate this? One browser use Event but other still use UIEvent. All specifications do not devote much space to exactly specify this behaviour.
Comment 2 Chris Rebert 2016-03-09 22:58:24 UTC
In Edge, scroll is a UIEvent.
In Safari, scroll is a plain Event.
Comment 3 Simon Pieters 2016-03-11 15:53:04 UTC
So it's 50/50. :-(

It seems .pageY contains potentially useful information in Gecko.

Searching on github reveals that there are some pages that use it to record/store scroll position:

https://github.com/search?l=javascript&q=onscroll+pagey&type=Code&utf8=✓

It seems less risky for WebKit/Blink to switch to UIEvent than the other way around, so I suggest we change scroll to use UIEvent.

Relatedly, in Gecko, .pageY is on UIEvent, not on MouseEvent as the current spec says. Though Chromium has it on MouseEvent.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3987

Rick, do you have opinions?
Comment 4 Simon Pieters 2016-03-14 15:33:47 UTC
According to MSDN pageX is on MouseEvent in IE/Edge, so I suppose scroll being a UIEvent is only useful in Gecko currently. Travis, does MSDN match what Edge does? Do you have any thoughts what we should spec here?