Modify ↓
Ticket #6505 (closed bug: fixed)
IE does not support live change events if a live click event is bound first.
| Reported by: | Tinister | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.4.3 |
| Component: | event | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
A simple test case:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jquery live test</title>
</head>
<body>
<button>Foo</button>
<select class="foo-select">
<option value="foo1">foo1</option>
<option value="foo2">foo2</option>
<option value="foo3">foo3</option>
<option value="foo4">foo4</option>
<option value="foo5">foo5</option>
<option value="foo6">foo6</option>
</select>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$('button').live('click', function() { alert('buttonclick'); } );
$('select.foo-select').live('change', function() { alert(this.value); } );
</script>
</body>
</html>
jQuery 1.4.2; confirmed broken on IE8, IE8 compatibility mode, and IE7.
If the $('button').live('click'... line appears second in the script block, then everything works as intended. But having the 'click' event first prevents the change event from occurring.
Change History
comment:2 Changed 3 years ago by snover
- Priority set to high
Ticket #7002 is a duplicate of this issue.
comment:4 Changed 3 years ago by snover
- need changed from Review to Patch
- Priority changed from high to blocker
- Milestone set to 1.4.3
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Ticket #6702 is a duplicate of this issue. Ticket #7039 is a duplicate of this issue.