From 4d6ca5c8c6950a0b734129cabbe8ed55a1afbe91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 8 May 2011 17:26:35 +0100 Subject: [PATCH 1/2] Prevent default when handling space key. --- examples/Animated/Flock.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/Animated/Flock.html b/examples/Animated/Flock.html index 1c217eea..5bb9471c 100644 --- a/examples/Animated/Flock.html +++ b/examples/Animated/Flock.html @@ -287,8 +287,10 @@ var layer = document.activeLayer; function onKeyDown(event) { - if (event.key == 'space') + if (event.key == 'space') { layer.selected = !layer.selected; + return false; + } }