Bug Tracker

Ticket #5892: test.html

File test.html, 1.4 KB (added by Guiswa, 10 years ago)
Line 
1<!DOCTYPE html>
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
5<head>
6        <title>Test</title>
7        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
8</head>
9
10<body>
11
12<input type="text" name="text1" id="text1" />
13<input type="text" name="text2" id="text2" />
14<button type="button" name="button1" id="button1" />Button</button>
15<p><strong>Steps to reproduce:</strong></p>
16<ol>
17        <li>Type "abc" in the first text input element</li>
18        <li>Hit tab or click elsewhere on the page to trigger the change event - you should see an alert</li>
19        <li>Click the button to set the value of the first text element to ""</li>
20        <li>Type "abc" in the first text input element again</li>
21        <li>Hit tab or click elsewhere on the page to trigger the change event again</li>
22</ol>
23
24<p><strong>Expected:</strong></p>
25
26<p>The alert appears for a second time.</p>
27
28<p><strong>Actual:</strong></p>
29
30<p>The alert does not appear.</p>
31
32<p><strong>Notes:</strong></p>
33
34<p>This only occurs in Internet Explorer 6-8 using jQuery 1.4.0. Previous versions of jQuery do not exhibit this behavior.</p>
35
36<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
37<script type="text/javascript">
38$(document).ready(function() {
39        $('input').change(function() {
40                alert('Change event works');
41        });
42       
43        $('#button1').click(function() {
44                $('input').val('');
45        });
46});
47</script>
48
49</body>
50
51</html>