OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description">There was a bug that moving focus with TAB from a number inp
ut with an invalid string dispatched an extra focus event and an extra blur even
t.</p> | 7 <p id="description">There was a bug that moving focus with TAB from a number inp
ut with an invalid string dispatched an extra focus event and an extra blur even
t.</p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 | 9 |
10 <input type=number id=number> | 10 <input type=number id=number> |
11 <input type=text> | 11 <input type=text> |
12 | 12 |
13 <script> | 13 <script> |
14 function handleFocus() { | 14 function handleFocus() { |
(...skipping 14 matching lines...) Expand all Loading... |
29 document.execCommand('InsertText', false, 'a'); | 29 document.execCommand('InsertText', false, 'a'); |
30 var tabEvent = document.createEvent('KeyboardEvent'); | 30 var tabEvent = document.createEvent('KeyboardEvent'); |
31 tabEvent.initKeyboardEvent('keydown', true, true, document.defaultView, 'U+0009'
); | 31 tabEvent.initKeyboardEvent('keydown', true, true, document.defaultView, 'U+0009'
); |
32 num.dispatchEvent(tabEvent); | 32 num.dispatchEvent(tabEvent); |
33 | 33 |
34 shouldBe('numOfFocus', '1'); | 34 shouldBe('numOfFocus', '1'); |
35 shouldBe('numOfBlur', '1'); | 35 shouldBe('numOfBlur', '1'); |
36 </script> | 36 </script> |
37 </body> | 37 </body> |
38 </html> | 38 </html> |
OLD | NEW |