mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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]
This commit is contained in:
@ -233,6 +233,12 @@ function initPuzzle() {
|
|||||||
command(2);
|
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
|
// In our dialog boxes, Return and Escape should be like pressing
|
||||||
// OK and Cancel respectively
|
// OK and Cancel respectively
|
||||||
document.addEventListener("keydown", function(event) {
|
document.addEventListener("keydown", function(event) {
|
||||||
|
Reference in New Issue
Block a user