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

Commit

Permalink
Merge pull request #11708 from alivedise/bugzilla/904470_v1-train/fix…
Browse files Browse the repository at this point in the history
…-class0-message

Bug 904470 - Use loadend event instead of paint event. r=timdream, a=leo+
  • Loading branch information
alivedise committed Aug 23, 2013
2 parents f7d6c5f + 767499e commit 3da369c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/system/js/window_manager.js
Expand Up @@ -327,7 +327,7 @@ var WindowManager = (function() {

// If this is a cold launch let's wait for the app to load first
var iframe = openFrame.firstChild;
if ('unpainted' in iframe.dataset) {
if ('unpainted' in iframe.dataset && 'unloaded' in iframe.dataset) {

if ('wrapper' in frame.dataset)
wrapperFooter.classList.add('visible');
Expand Down Expand Up @@ -479,6 +479,8 @@ var WindowManager = (function() {
var iframe = evt.target;
var frame = iframe.parentNode;

delete iframe.dataset.unloaded;

if (iframe.dataset.unpainted) {
iframe.addEventListener('mozbrowserfirstpaint', function painted() {
iframe.removeEventListener('mozbrowserfirstpaint', painted);
Expand Down Expand Up @@ -1191,6 +1193,8 @@ var WindowManager = (function() {
// frames are began unpainted.
iframe.dataset.unpainted = true;

iframe.dataset.unloaded = true;

if (!manifestURL) {
frame.setAttribute('data-wrapper', 'true');
return frame;
Expand Down

0 comments on commit 3da369c

Please sign in to comment.