I can confirm that removing the property does fix the sizing issue. http://jsfiddle.net/7mKrs/4/
I've made the overload setter to fix this: http://jsfiddle.net/7mKrs/5/ I'll write a Github Issue in Core. (here it is: https://github.com/mootools/mootools-core/issues/2129). Thanks for the report. On Sat, Nov 19, 2011 at 11:10 AM, gonchuki <[email protected]> wrote: > The actual fix should be removing the width and height attributes, not > setting a CSS style to stomp them over. > > I solved this same issue a couple days ago, where we have an "image > viewer" that lazily loads the image via AJAX and then the image is > constrained to the width of the viewport via CSS (max-width: 100%). In > IE9 the image got distorted aspect ratio (height remained the > original), and on IE8 it had the width of the padding box of the > parent. Removed width and height attributes in the load event, and > then everything worked even back to IE7. > > > > On Nov 18, 11:17 pm, Olmo Maldonado <[email protected]> wrote: > > Perhaps on Element.set('src') > > > > Although, I'm not sure if there's a practical feature detection, so it'll > > have to be a flag against the browser. > > > > On Sat, Nov 19, 2011 at 1:12 AM, Sanford Whiteman <[email protected] > >wrote: > > > > > > > > > > > > > > > > > > Here's the fix:http://jsfiddle.net/7mKrs/2/ > > > > > Makes sense to me as the brute-force way -- but do you not think it's > > > something that could go in core as a behavior standardization/fix? > > > > > Not that I care about this myself, mind you... > > > > > -- S. >
