Closed
Bug 32438
Opened 24 years ago
Closed 24 years ago
On image swap IMG dimensions are preserved when they shouldn't
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: martin.honnen, Assigned: jst)
Details
Attachments
(1 file)
423 bytes,
text/html
|
Details |
When I update the SRC of an IMG element which has no WIDTH and no HEIGHT attribute set the IMG should take on the dimensions of the newly assigned image. It did so in earlier builds of Mozilla but doesn't at least not in the 20000315 build I have. I have the following example code <A HREF="javascript: document.anImage.src = 'http://bugzilla.mozilla.org/ant.jpg'; void 0"> swap in ant </A> | <A HREF="javascript: document.anImage.src = 'http://www.mozilla.org/images/mozilla-banner.gif'; void 0"> swap in banner </A> <BR> <IMG NAME="anImage" SRC="http://www.mozilla.org/images/mozilla-banner.gif"> The banner image is shown in its natural size but when you swap in the ant it is displayed distorted as the banner image's dimensions are preserved. When you mouseover one of the links the IMG suddenly takes on the right dimensions of the ant image but if you then swap in the banner again that is distorted as again the old images dimensions are preserved. So give is back IMG elements which resize correctly when the SRC is changed.
Reporter | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 2•24 years ago
|
||
This seems to work perfectly on linux, no distorted drawing that I can see, but due to bug 7019 the image is not resized, it's possible that fixing 7019 fixes this problem too, Could be a dup even...
Reporter | ||
Comment 3•24 years ago
|
||
Yes, it is a duplicate. That 7019 being around for so long I still wonder why I though I had Mozilla builds which did a resize. *** This bug has been marked as a duplicate of 7019 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•