aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-11 11:14:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-11 11:15:27 -0700
commit83c6879163bbda22ed7672e2899f07c8412c4bdb (patch)
treeb1981bc8bac599ab3200bb8534c7b2bfd8bac1ba
parent26e86e4a4f42c59b2a161c7063383d42ce54afe4 (diff)
listen to blur on the window, not the document, so chrome works
-rw-r--r--src/library_sdl.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 91c3c4bd..9383834f 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -755,7 +755,7 @@ var LibrarySDL = {
document.addEventListener("keydown", SDL.receiveEvent);
document.addEventListener("keyup", SDL.receiveEvent);
document.addEventListener("keypress", SDL.receiveEvent);
- document.addEventListener("blur", SDL.receiveEvent);
+ window.addEventListener("blur", SDL.receiveEvent);
document.addEventListener("visibilitychange", SDL.receiveEvent);
}
window.addEventListener("unload", SDL.receiveEvent);