diff options
author | luchen@google.com <luchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 19:01:49 +0000 |
---|---|---|
committer | luchen@google.com <luchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 19:01:49 +0000 |
commit | 3193445aab2405bc9f88a1318091a45e9cc59eaa (patch) | |
tree | e72409300f34a9907171eab0fab51ff893938817 /o3d/samples | |
parent | 55d87859f6f8cdba954938be8ee000526b02a79b (diff) | |
download | chromium_src-3193445aab2405bc9f88a1318091a45e9cc59eaa.zip chromium_src-3193445aab2405bc9f88a1318091a45e9cc59eaa.tar.gz chromium_src-3193445aab2405bc9f88a1318091a45e9cc59eaa.tar.bz2 |
Fixes a TypeError bug introduced in the picking change. Cannot cancel event propagation if the event is cloned; need to cancel the original event object.
Review URL: http://codereview.chromium.org/2962009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples')
-rw-r--r-- | o3d/samples/o3d-webgl/client.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/o3d/samples/o3d-webgl/client.js b/o3d/samples/o3d-webgl/client.js index 877bee4..798ffe3 100644 --- a/o3d/samples/o3d-webgl/client.js +++ b/o3d/samples/o3d-webgl/client.js @@ -823,6 +823,7 @@ o3d.Client.getLocalXY_ = function(eventInfo) { o3d.Client.wrapEventCallback_ = function(handler, doCancelEvent) { return function(event) { event = o3d.Client.getEvent_(event); + var originalEvent = event; var info = o3d.Client.getEventInfo_(event); var relativeCoords = o3d.Client.getLocalXY_(info); // In a proper event, there are read only properties, so we clone it. @@ -833,7 +834,8 @@ o3d.Client.wrapEventCallback_ = function(handler, doCancelEvent) { event.deltaY = -info.wheel; handler(event); if (doCancelEvent) { - o3djs.event.cancel(event); + // Need to cancel the original, un-cloned event. + o3djs.event.cancel(originalEvent); } }; }; |