Skip to content

Commit

Permalink
Fix #47 - touchable if maxTouchPoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 5, 2019
1 parent 9862ac8 commit ee4db57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ If *touchable* is specified, sets the touch support detector to the specified fu

```js
function touchable() {
return "ontouchstart" in this;
return navigator.maxTouchPoints || ("ontouchstart" in this);
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function defaultSubject(d) {
}

function defaultTouchable() {
return "ontouchstart" in this;
return navigator.maxTouchPoints || ("ontouchstart" in this);
}

export default function() {
Expand Down

0 comments on commit ee4db57

Please sign in to comment.