Bug 521129 - Alt-Tab in FullScreen video does not exit full screen mode. r=dolske
authorDão Gottwald <dao@mozilla.com>
Sun, 08 Nov 2009 10:22:38 +0100
changeset 33136 af8ba1f406037d48ab4e62c2e0bd0c7e536eea5f
parent 33135 d2d2ed0ded6d548827297600b9d5b2a8411db8b1
child 33137 51b506aad4b1a7bceabb9941be6e58052cfb8d2b
push id798
push userdgottwald@mozilla.com
push dateTue, 24 Nov 2009 20:42:48 +0000
reviewersdolske
bugs521129
milestone1.9.2b4pre
Bug 521129 - Alt-Tab in FullScreen video does not exit full screen mode. r=dolske
browser/base/content/fullscreen-video.xhtml
--- a/browser/base/content/fullscreen-video.xhtml
+++ b/browser/base/content/fullscreen-video.xhtml
@@ -133,16 +133,20 @@ window.addEventListener("unload", functi
     contentVideo.muted = video.muted;
     if (!video.paused && !video.ended) {
       video.pause();
       contentVideo.play();
     }
   }
 }, false);
 
+window.addEventListener("deactivate", function () {
+  window.close();
+}, false);
+
 window.addEventListener("keypress", function (event) {
   if (event.keyCode == event.DOM_VK_ESCAPE) {
     window.close();
     return;
   }
 
   resetIdleTimer();