Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Workaround bug 787519 and ensure the opening/closing transition starts
Browse files Browse the repository at this point in the history
  • Loading branch information
timdream committed Aug 31, 2012
1 parent 670274d commit c5a73c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/system/js/window_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -311,6 +318,7 @@ var WindowManager = (function() {
};

req.onerror = function(evt) {
clearTimeout(timer);
console.warn('Window Manager: getScreenshot failed.');
callback();
};
Expand Down

0 comments on commit c5a73c4

Please sign in to comment.