diff options
| author | Simon Tatham <anakin@pobox.com> | 2013-04-05 15:49:21 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2013-04-05 15:49:21 +0000 |
| commit | e6afc02942ffd4e3738c5a0ac28a14bbbe345ba8 (patch) | |
| tree | c32f0f282dfa4046176d699a8f0b18e853b13d74 /emccpre.js | |
| parent | 8f87f2ce894f6ba017581abb89e2e0927067bed7 (diff) | |
| download | puzzles-e6afc02942ffd4e3738c5a0ac28a14bbbe345ba8.zip puzzles-e6afc02942ffd4e3738c5a0ac28a14bbbe345ba8.tar.gz puzzles-e6afc02942ffd4e3738c5a0ac28a14bbbe345ba8.tar.bz2 puzzles-e6afc02942ffd4e3738c5a0ac28a14bbbe345ba8.tar.xz | |
IE doesn't default to giving focus to the puzzle canvas on a mouse
click, so manually implement that behaviour. (Without it, it's quite
hard to focus the canvas at all in IE.)
[originally from svn r9806]
Diffstat (limited to 'emccpre.js')
| -rw-r--r-- | emccpre.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -233,6 +233,12 @@ function initPuzzle() { command(2); }; + // In IE, the canvas doesn't automatically gain focus on a mouse + // click, so make sure it does + onscreen_canvas.addEventListener("mousedown", function(event) { + onscreen_canvas.focus(); + }); + // In our dialog boxes, Return and Escape should be like pressing // OK and Cancel respectively document.addEventListener("keydown", function(event) { |