Tool: check for event first, before checking for event.targetTouches.

This commit is contained in:
Jonathan Puckey 2011-05-07 13:51:26 +01:00
parent 72976f4191
commit 97b7dacfa2

View file

@ -46,7 +46,7 @@ var Tool = this.Tool = ToolHandler.extend(new function() {
// If the event was triggered by a touch screen device, // If the event was triggered by a touch screen device,
// prevent the default behaviour, as it will otherwise // prevent the default behaviour, as it will otherwise
// scroll the page: // scroll the page:
if (event.targetTouches) if (event && event.targetTouches)
event.preventDefault(); event.preventDefault();
var point = event && viewToArtwork(event, that._document); var point = event && viewToArtwork(event, that._document);
// If there is only an onMouseMove handler, call it when // If there is only an onMouseMove handler, call it when