Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touchevents: Use mq in touch event detection. #2309

Merged
merged 2 commits into from
May 3, 2018

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Apr 29, 2018

testStyles + offsetTop is unnecessarily slow if the browser supports matchMedia.

testStyles is unnecessarily slow if the browser supports matchMedia.
@emilio
Copy link
Contributor Author

emilio commented Apr 29, 2018

The Travis and AppVeyor failures look unrelated (and the Travis + node 6 run is green), but let me know if they're not.

@miketaylr
Copy link

r? @ryanseddon

Copy link
Member

@patrickkettner patrickkettner left a comment

Choose a reason for hiding this comment

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

seems like a good change, just a small question on the other change

@@ -12,5 +12,5 @@
Detect support for Hover based media queries
*/
define(['Modernizr', 'addTest', 'mq'], function(Modernizr, addTest, mq) {
Modernizr.addTest('hovermq', mq(('(hover)')));
Copy link
Member

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just saw the extra parentheses while I was going through similar patterns. I can remove it if needed, but I thought a bit of cleanup never hurts. Let me know if you want to remove that commit from this PR and submit it separately.

Copy link
Member

Choose a reason for hiding this comment

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

no we're good, just making sure there wasn't an issue

@patrickkettner patrickkettner merged commit 145ec66 into Modernizr:master May 3, 2018
@emilio emilio deleted the mq-fast branch May 3, 2018 07:22
@rejas
Copy link
Member

rejas commented May 3, 2018

@emilio @patrickkettner the PR #2294 would fix the Travis and AppVeyor failures

@past past mentioned this pull request May 8, 2018
rejas pushed a commit that referenced this pull request May 24, 2018
* touchevents: Use mq in touch event detection.

testStyles is unnecessarily slow if the browser supports matchMedia.

* hovermq: remove stray parenthesis.
@rejas rejas added this to the Modernizr v3.7 milestone Jun 12, 2018
@bholley
Copy link
Contributor

bholley commented Jun 19, 2018

@emilio what's the status here?

@rejas
Copy link
Member

rejas commented Jun 19, 2018

Its merged but not yet released @bholley

@bholley
Copy link
Contributor

bholley commented Jun 19, 2018

Ok, great! I just remeasured, and confirmed that this fix still saves ~15ms on cnn pageload.

@patrickkettner, any chance y'all could do another dot release (similar to #2291) so that we can get this into CNN's pipeline?

@rejas
Copy link
Member

rejas commented Jun 20, 2018

would love to see a v3.7 out the door too, alas we are still behind with the release notes for 3.6 :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants