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

Modernizr.touch changes, as per #548 #800

Merged
merged 3 commits into from Jan 29, 2013
Merged

Conversation

stucox
Copy link
Member

@stucox stucox commented Jan 29, 2013

Modernizr.touch changes, as per #548:

  • Modernizr.touch -> Modernizr.touchevent (but touch still aliased)
  • Modernizr.pointerevents (CSS pointer-events) -> Modernizr.csspointerevents
  • Added test for DOM PointerEvents as Modernizr.pointerevents

API-breaking change.

I've done the PointerEvents test by checking for presence of the pointerdown event. Microsoft's recommendation is to use window.navigator.pointerEnabled (prefixed), but it isn't clear if pointerEnabled is intended to change dynamically as devices are connected/disconnected... anyone know? We agreed on #548 that Modernizr should focus on static capability to support pointer events, not dynamic state of whether or not an appropriate device is connected.

Review please!

@SlexAxton
Copy link
Member

This looks good to me. I think the modulizr folder can pretty much go away in this new world, if I'm remembering correctly. Ashamed that I didn't have auto-whitespace removal when I wrote that file.

SlexAxton added a commit that referenced this pull request Jan 29, 2013
Modernizr.touch changes, as per #548
@SlexAxton SlexAxton merged commit 63f0022 into Modernizr:master Jan 29, 2013
@ryanseddon
Copy link
Member

I think navigator.pointerEnabled would be just fine as the device should always have at least one input.

@stucox
Copy link
Member Author

stucox commented Jan 29, 2013

Touch screen via a KVM which hasn't been switched over?

And for the sake of future-proofing, who knows what people will come up with in the future... we thought they'd always have a mouse.

@stucox
Copy link
Member Author

stucox commented Jan 29, 2013

(I'm aware I'm probably being overly cautious...)

@stucox stucox deleted the 548-touch branch January 29, 2013 22:38
@ryanseddon
Copy link
Member

fair enough it's not overly complicated test and like you said it's more robust than just checking pointerEnabled.

@stucox
Copy link
Member Author

stucox commented Jan 29, 2013

Of course keyboard-only is perfectly valid too!

SlexAxton added a commit to SlexAxton/Modernizr that referenced this pull request Feb 14, 2013
@stucox stucox mentioned this pull request Mar 23, 2013
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
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.

None yet

3 participants