Okay, I spent a while today fixing up various issues with the new HTML editor and ran into this bug. I've fixed this in the new editor, but since the new editor is a little different, you'll have to wait for 2.2.1 before you get it fixed. In the mean time, I'd recommend just turning off that javascript.
Adrian
Adrian