facebook/react — pull request #2271 by syranide (2014-09-29 15:04:47+00:00)
Title: Disable ViewportMetrics unless MouseEvent lacks support for pageX/pageY

For #1300, only IE8 lacks `pageX`/`pageY` (and perhaps really old FF I guess).

From my https://github.com/facebook/react/issues/1300#issuecomment-52509117:

Test plan: not yet (want your input on the PR first)

----

https://github.com/facebook/react/blob/master/src/browser/ui/ReactEventListener.js#L65
https://github.com/facebook/react/blob/master/src/browser/ui/ReactEventListener.js#L165

That makes no sense at all to me, `refresh` does not take an argument, yet we get the scroll position and provide it as an argument. Instead, `refresh` gets the scroll position internally and uses that? So we call `getUnboundedScrollPosition` twice, but only use the result once (also, this should be broken for events inside iframes, for IE8).

---

https://github.com/facebook/react/blob/master/src/browser/eventPlugins/TapEventPlugin.js#L54
I'm pretty sure any browsers that supports touch also supports `pageX`/`pageY`... ?