possible event bug when binding to content added with html()?

possible event bug when binding to content added with html()?


http://pastebin.com/f6990228d
In this code clicking on the text should change it between "STATE1"
and "STATE2" but doesn't. It actually does switch to STATE1 again but
due to a spurious "click" event immediately switches back to STATE2 so
that the switch can't be really seen. Uncommenting the commented
javascript line and commenting the one above it no longer uses html()
and show the correct behavior.
Is this a bug or am I doing something fundamentally wrong here?
Regards,
Dennis
PS: I filed a bug here: http://dev.jquery.com/ticket/4867