Thursday, August 25, 2011

More IE issues: GWT setInnerHTML() and HTML5 tags

I meant to post this on here a while ago so I wouldn't forget to check up on this issue (p.s. - I forgot).

A while back , I had a few issues using some of the newer HTML tags ( <article> to be exact) in Internet Explorer. I was manipulating a String of HTML, and passing this String into the constructor of an HTMLPanel. Things looked wonderful in Firefox... but not so wonderful in IE. As I dug down deeper, I noticed that HTMLPanel is using Elemenet.java 's setInnerHTML() method which calls the native "this.innerHTML".

Bad things happen in IE land with this little guy. I was under a bit of a time crunch, so, although not quite semantically correct, I replaced the <article> tag I was using with a plain old <div> in IE before instantiating my HTMLPanel.

Its not pretty - just a temporary fix until a later date. I did submit a bug to the GWT folks ... it's still in new status though. Maybe I'll have to take a crack at that one and just fix it myself :)

No comments:

Post a Comment