Obscure DOM Bugs R Us

Nothing makes me happier than spending almost an entire day at work getting to the bottom of a problem that, after all is said and done, turns out isn’t my fault after all.

Here’s a test case. Basically, if you have a bunch of radio buttons, and in the middle of them, a set of text fields that get copied via cloneNode and then subsequently removed via removeChild during the page’s lifetime, refreshing the page breaks the checked state of any radio buttons that followed the cloned and removed node(s).

This smells like a bug in Mozilla’s bfcache, which may make this bug much older than I’d like to think it is.

2008.10.15 · permalink