Site Navigation

Friday, January 18, 2008

Bug or Feature? - Round One

We're adding a new post type here, called "Bug or Feature?". It highlights a particular behavior in one or more browsers, that, well, could be a Bug, or it could be a Feature... we'll open up the comments for your vote and opinion.

Ok, so what is the "Bug or Feature" for today? - Glad you asked.

Synopsis:In IE, if you ask for the .innerHTML of an element, you will get a 'DOM' fragment representing the inner HTML content (and every other browser will do the same). However there is a catch.

If I have the following HTML, I would expect it to return the same content:

Bug. I would say that innerHTML should return whatever was originally sent to the browser in the HTTP Response & any changes made by Javascript. Including changes made by the user seems odd because the only time I want to know what the user entered is when I am testing a field for validation (i.e. did they enter a number)

Will the value be "Joe Bloggs" or Joe Bloggs ? Good chance it's Joe Bloggs which mean that you can't copy an element with the innerHTML propriety. cloneNode would be a workaround, but in some case people might not want to use cloneNode or it won't apply.

Recent Updates

Feb. 7,2009 - Added a new Tag called Broken By Design. It is applied to all reported bugs that the browser vendor has indicated that they have no intention of fixing this bug any time soon and is therefore broken "By Design".

Feb. 7,2009 - Updated as many bug reports as possible for Internet Explorer 8 (IE8) to reflect the status of IE8 RC1 since according to the IE Blog the RTM release is coming soon. If you want to know, click to see what has been fixed?