Sitelet https://github.com/react/react/pull/9290
Skip to content

Remove viewport metrics, other pageX/pageY behaviors - #9290

Merged
gaearon merged 2 commits into
react:masterfrom
nhunzaker:remove-viewport-metrics
Mar 31, 2017
Merged

gaearon merged 2 commits into
react:masterfrom
nhunzaker:remove-viewport-metrics

Conversation

@nhunzaker

Copy link
Copy Markdown
Contributor

pageX and pageY are supported in every browser, which makes it possible to remove a lot of code. I don't expect this one to get merged so easily; I'm happy to provide any additional testing.

Test methodology

I created a case here using React's pageX/pageY feature test:
http://codepen.io/nhunzaker/pen/GWwmyK

Test Results

YES

IE9
FF 3
Chrome 15
Opera 10.6
Yandex 14.12
Safari 4 - Windows
Safari 4 - Mac
Windows Phone 8.1
iOS 4.3.2
Android 4 (Native Browser)
Android 4.4 (Chrome)

NO

IE8

@gaearon

gaearon commented Mar 30, 2017

Copy link
Copy Markdown
Contributor

Seems like it's indeed IE8 only.
Reference:

@gaearon gaearon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run npm run prettier so that CI passes

@nhunzaker
nhunzaker force-pushed the remove-viewport-metrics branch from 211f861 to b48cfa3 Compare March 30, 2017 16:49
@nhunzaker

Copy link
Copy Markdown
Contributor Author

@gaearon Prettiered and squashed.

@nhunzaker
nhunzaker force-pushed the remove-viewport-metrics branch from b48cfa3 to 2769563 Compare March 30, 2017 23:14
@nhunzaker

Copy link
Copy Markdown
Contributor Author

Should pass, waiting on a lint fix: #9300

@gaearon

gaearon commented Mar 30, 2017

Copy link
Copy Markdown
Contributor

It will also fail because you need to run ./scripts/fiber/record-tests and commit the result.

event.pageX and event.pageY are in every browser React supports.
@nhunzaker
nhunzaker force-pushed the remove-viewport-metrics branch from 2769563 to c272e49 Compare March 30, 2017 23:47
@nhunzaker

Copy link
Copy Markdown
Contributor Author

Done. I am sorry for the trouble.

@gaearon
gaearon merged commit bd28025 into react:master Mar 31, 2017
@gaearon

gaearon commented Mar 31, 2017

Copy link
Copy Markdown
Contributor

No worries, thank you for this!

@nhunzaker nhunzaker mentioned this pull request Jul 12, 2017
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
* Remove viewport metrics

event.pageX and event.pageY are in every browser React supports.

* Rerecord tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants