Side navigation
#11796 closed bug (fixed)
Opened May 21, 2012 09:49PM UTC
Closed May 23, 2012 01:34AM UTC
Change event doesn't bubble in oldIE when content is copied via .html()
Reported by: | MoonScript | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This is happening because the content is being retrieved via the .html() function, which includes the jQuery change-delegation artifact on the element: _change_attached="true". When that HTML string is then repopulated into the DOM, the change event does not bubble, because it already contains the _change_attached attribute, so jQuery skips it.
This is very similar to ticket #10878 (but with html instead of clone) and #11649.
You can see the issue here in IE < 9:
Fix can be seen here: http://jsfiddle.net/MoonScript/hcAYz/1/
Pull request: https://github.com/jquery/jquery/pull/789