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

Allow pointer events to be used if supported #37

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/view/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ var View = Base.extend(Emitter, /** @lends View# */{
DomElement.setPrefixed(element.style, {
userDrag: none,
userSelect: none,
// Prevent pointer events from doing things like panning the page
touchAction: none,
touchCallout: none,
contentZooming: none,
tapHighlightColor: 'rgba(0,0,0,0)'
Expand Down Expand Up @@ -1069,7 +1071,7 @@ new function() { // Injection scope for event handling on the browser
// Touch handling inspired by Hammer.js
var navigator = window.navigator,
mousedown, mousemove, mouseup;
if (navigator.pointerEnabled || navigator.msPointerEnabled) {
if (window.PointerEvent || navigator.msPointerEnabled) {
// HTML5 / MS pointer events
mousedown = 'pointerdown MSPointerDown';
mousemove = 'pointermove MSPointerMove';
Expand Down