mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Tool: check for event first, before checking for event.targetTouches.
This commit is contained in:
parent
72976f4191
commit
97b7dacfa2
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ var Tool = this.Tool = ToolHandler.extend(new function() {
|
|||
// If the event was triggered by a touch screen device,
|
||||
// prevent the default behaviour, as it will otherwise
|
||||
// scroll the page:
|
||||
if (event.targetTouches)
|
||||
if (event && event.targetTouches)
|
||||
event.preventDefault();
|
||||
var point = event && viewToArtwork(event, that._document);
|
||||
// If there is only an onMouseMove handler, call it when
|
||||
|
|
Loading…
Reference in a new issue