Permalink
Browse files

Workaround bug 787519 and ensure the opening/closing transition starts

  • Loading branch information...
1 parent 670274d commit c5a73c48aa88f1747ee124645d255ba225c3402f @timdream timdream committed Aug 31, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 apps/system/js/window_manager.js
View
8 apps/system/js/window_manager.js
@@ -285,7 +285,14 @@ var WindowManager = (function() {
var req = app.frame.getScreenshot();
+ // Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=787519
+ var timer = setTimeout(function getScreenshotTimeout() {
+ console.warn('Window Manager: getScreenshot timeout.');
+ callback();
+ }, 500);
+
req.onsuccess = function(evt) {
+ clearTimeout(timer);
var result = evt.target.result;
callback(result);
@@ -311,6 +318,7 @@ var WindowManager = (function() {
};
req.onerror = function(evt) {
+ clearTimeout(timer);
console.warn('Window Manager: getScreenshot failed.');
callback();
};

0 comments on commit c5a73c4

Please sign in to comment.