Image width/height attributes in IE differs from other browsers. #2142

Closed
ibolmo opened this Issue Nov 28, 2011 · 2 comments

3 participants

@ibolmo
MooTools member

If the image is inserted in the DOM, then IE will set width/height to the src's width/height. If there's no src, then it will still set a width/height except to the placeholder's width/height:

Internet Explorer placeholder example

Typical of IE it decides to mess with the width/height attribute and we should help the developer have a consistent experience.

  1. When we set the src the image width/height stays the same even if the new src has different dimensions. We could overload and removeAttributes width/height.
  2. When we remove width/height attributes it'll reuse the src, if the src is not set it'll use the placeholders width/height. We could setAttribute width/height to 0, if src attribute is not set.

Question is whether this behavior is expected. Need to research what the other browsers, since this behavior is not well explained in the W3C specs.

@arian
MooTools member

isn't this related to #2129?

@fakedarren
MooTools member

Closing as per #2129

@fakedarren fakedarren closed this Feb 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment