From 97b7dacfa27acb76b2faaf4357471544af6f1315 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 7 May 2011 13:51:26 +0100 Subject: [PATCH] Tool: check for event first, before checking for event.targetTouches. --- src/tool/Tool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool/Tool.js b/src/tool/Tool.js index 837062b2..21c811e3 100644 --- a/src/tool/Tool.js +++ b/src/tool/Tool.js @@ -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