Ticket #7026 (closed bug: invalid)
Image Attribute Extraction Fails in IE, Works in Firefox
|Reported by:||rwadams||Owned by:|
|Keywords:||img attribute Firefox MSIE||Cc:|
In Firefox 3.6.9, the above page renders correctly. However, in IE 8.0.7600.16385 (64-bit edition), the width of tables enclosing images is not set to the image width, causing the caption to extend beyond the image's edge (the image in the upper left page corner demonstrates this misbehavior).
The failing code code is at line 39 of hymn2.js, which reads:
var width = $(selector + " img").attr("width");
In Firefox, this correctly extracts the width attribute, but in IE, this code always yields a zero width.
Is this a bug? Is there a workaround to get the width correctly?