Side navigation
#5413 closed bug (fixed)
Opened October 28, 2009 02:21AM UTC
Closed April 10, 2011 08:00PM UTC
Last modified March 09, 2012 04:23PM UTC
tag "img" width/height attribute is zero (IE)
Reported by: | Ammon | Owned by: | timmywil |
---|---|---|---|
Priority: | low | Milestone: | 1.6 |
Component: | attributes | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When img tag is hidden
(style is "display:none" or contain in a div that has style is "display:none"),
use the attr function to get the width/height will return zero, not the actually width/height attribute in img tag.
Attachments (1)
Change History (6)
Changed June 13, 2010 06:09PM UTC by comment:1
component: | unfiled → attributes |
---|
Changed October 31, 2010 06:44PM UTC by comment:2
milestone: | 1.4 |
---|---|
priority: | major → low |
status: | new → open |
version: | 1.3.2 → 1.4.3 |
This is caused by .attr
using DOM properties instead of HTML attributes. test case
Changed April 02, 2011 01:20AM UTC by comment:4
milestone: | → 1.6 |
---|---|
owner: | → timmywil |
status: | open → assigned |
version: | 1.4.3 → 1.5.2 |
Even though attrHooks uses getAttribute and fixed this in certain browsers test case with attrhooks, this was still a problem for ie6 and 7. However, an update has been added to fix the issue in the pull request. Commit 45a7f63e1ff90cc15dfde7d9a7df7dc62690c6b1
Changed April 02, 2011 01:42AM UTC by comment:5
Much shorter solution https://github.com/timmywil/jquery/commit/d0e457c8b70b2e21962cc8cb29d06ab2e16c8ba2
Changed April 10, 2011 08:00PM UTC by comment:6
resolution: | → fixed |
---|---|
status: | assigned → closed |