Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6884781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:33:09+00:00 2026-05-27T05:33:09+00:00

In Firefox 8.0 on ubuntu 11.10, the onload function, draw , is called although

  • 0

In Firefox 8.0 on ubuntu 11.10, the onload function, draw, is called although img.complete is false. I managed to solve it somewhat with the setTimeout hack, but it’s not pretty.
I tried setting the img.onload before setting img.src. Although I always get img.complete as true this way, img.width is zero, and img.src si also empty, so it doesn’t work.
Any ideas how to implement this properly?

        var draw=function(img,ctx,x,y)
        { if(!img.complete)
            {   setTimeout(function(){draw(img,ctx,x,y);},50);
            }
            else
            {
                ctx.drawImage(img,x,y); 
            }
        }
        for(i=0;i<9;i++)
        {   img=new Image();
            img.src="/media/"+url[i];
            img.onload=(draw)(img,ctx,tile.x*offset[i].x,tile.y*offset[i].y);
        }   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:33:09+00:00Added an answer on May 27, 2026 at 5:33 am

    The complete property is buggy in Firefox. Once it’s true, it’s always true (even if you change the image).

    I got around it by testing a new Image object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use jPlayer under Firefox 3.6 (Ubuntu) function loadmedia() { $('#jquery_jplayer_1').jPlayer('setMedia', {
Firefox 3 now stores bookmarks in a Sqlite file called profiles.sqlite. This file is
I'm using Ubuntu 10 and trying out the below code in Firefox 3.6 and
I am new to Linux and using Ubuntu, trying to install firefox-4.0b1.tar.bz2 but don't
For testing purposes, I want to install two different instances of firefox on ubuntu
On my new Ubuntu system, I've managed to get Apache2 up and running for
I am using ubuntu 11.04 with an apache-mysql server (I think that is called
Firefox on Ubuntu seems to render some HTML considerably differently compared to other browsers.
i am using ubuntu , and the themes of firefox sucks .. so does
I am using Ubuntu 10.04 LTS version which has Firefox 3.6.3 version installed. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.