Closed (fixed)
Project:
Picture
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 May 2013 at 14:23 UTC
Updated:
15 May 2014 at 11:41 UTC
Jump to comment: Most recent
Not a huge issue, but if you set your fluid layout to use 'empty image', view it, then scale your browser back up, the fixed dimensions do not get removed from the img tag. This will only happen to a few users I expect (web designers, tablet owners that like to rotate) but would be good to resolve.
Anyone else had this issue?
My current temporary solution is to fix with css (below formatted as LESS):
body.responsive-layout-narrow, body.responsive-layout-normal, body.responsive-layout-wide {
img[width="1"][height="1"] {
width:auto !important;
height:auto !important;
}
}
This appears to do the trick for me nicely, although would be good if the js automatically removed these items for me. It would probably work if ALL the spans had a width/height of null so as to remove the setting of "1".
Dan
Comments
Comment #1
attiks commentedCan you paste the html output of the picture?
Comment #2
retrodans commentedThis is it before I scale the browser to fluid:
And this is after a resize the browser to fluid (empty image) and back again:
Is this what you were after?
Comment #3
attiks commenteddo you have a data-width/data-height inside the spans? Can you paste all spans as well?
Comment #4
retrodans commentedSorry. here are the full groups:
Before resizing:
After resizing:
Comment #5
attiks commentedI pushed a fix for picturefill.js, can you try it. Use the code from git, or wait 12 hours for the package to be updated.
Comment #6
retrodans commentedJust tested on local test environment, and appears to work perfectly. Thanks for the tidy fix.