img onload event is fired twice when switching the image from absolute to relative positioning

RESOLVED FIXED

Status

()

Core
DOM: Events
P4
normal
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: Fjord Lynn, Assigned: joki (gone))

Tracking

({testcase})

Trunk
x86
Windows 2000
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826

When I make an image and then have it absolutely positioned (so as to load it in
the background, off screen and not effecting other elements), and then switch
the image to relative positioning on the "onload" I get 2 onload events. It
doesn't do this with other stylesheet changes (visibility, for example, which is
my current work around but won't work in all cases).

Reproducible: Always

Steps to Reproduce:
1. Go to http://lynnsoft.2y.net:81/mozerr/err1.html
2. Inspect the source, it is a cut down version of this problem.

Actual Results:  
You get the "Loaded" alert twice. It even looks like the image is rendered twice.

Expected Results:  
It should have only fired the "onload" once, thus displaying the "Loaded" alert
once.

Comment 1

15 years ago
Fjord,
I get an access denied error when I try to access the url above. Can you please
arrange to have that fixed. Or even better, attach your html testcase here (see
create new attachment above)
(Reporter)

Comment 2

15 years ago
Created attachment 104436 [details]
HTML file showing the error

Ok. I switched it to use an image on the mozilla server so clicking on the link
here should show the problem. Don't know why you had access problems.

Comment 3

15 years ago
confirming
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

15 years ago
Keywords: testcase
Priority: -- → P4
Fixed by checkin for bug 83774
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Depends on: 83774
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.