From 669d93a62967d88b4c4dd33b919737a386bf958a Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 20 May 2014 09:29:19 +0200 Subject: [PATCH] Snap.html: Focus the world canvas on startup so Snap reacts to keyboard events right away (without having to click on the IDE first) --- history.txt | 3 ++- snap.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/history.txt b/history.txt index faf992de..960daf1c 100755 --- a/history.txt +++ b/history.txt @@ -2128,4 +2128,5 @@ ______ 140520 ------ -* Morphic: Prevent default action for ctrl-/cmd-key events +* Morphic: Prevent default action for ctrl-/cmd-key event +* Snap.html: Focus the world canvas on startup, so Snap reacts to keyboard events right away diff --git a/snap.html b/snap.html index 66604c55..904aba8c 100755 --- a/snap.html +++ b/snap.html @@ -22,6 +22,7 @@ var world; window.onload = function () { world = new WorldMorph(document.getElementById('world')); + world.worldCanvas.focus(); new IDE_Morph().openIn(world); setInterval(loop, 1); };