Opened 13 years ago
Closed 13 years ago
#6038 closed bug (worksforme)
OnChange event problem with SELECT and IE
Reported by: | voxen | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4.2 |
Component: | core | Version: | 1.4.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
SELECT that have attribute SIZE don't throw OnChange event properly.
Test code below:
<html> <script type="text/javascript" src="jquery-1.4.1.min.js"></script> <script type="text/javascript"> $(function() {
$('#test').change(function() {
alert('test change');
});
}) </script> <body> <select id="test" size="5"> <option value="1">A</option> <option value="2" selected>B</option> <option value="3">C</option> </select> </body> </html>
Test #1: Option B is selected by default. Click on A or C: the change event is NOT called. Click again on A or C: the change event is called. -> First click doesn't call event handler.
Test #2: Option B is selected. Click on B first (the selected item). Click on A or C: the change event is called.
This has already been fixed in jQuery 1.4.2.