| <html> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| </head> |
| <body> |
| <input id="input" type='date' /> |
| <script> |
| description("This tests that changing an input element's type or speech attribute does not cause focusout event."); |
| |
| focusoutCalled = false; |
| |
| input.addEventListener('focusout', function() { |
| focusoutCalled = true; |
| }); |
| input.focus(); |
| input.type = 'month'; |
| shouldBeFalse('focusoutCalled'); |
| input.type = 'week'; |
| shouldBeFalse('focusoutCalled'); |
| input.type = 'time'; |
| shouldBeFalse('focusoutCalled'); |
| input.type = 'datetime-local'; |
| shouldBeFalse('focusoutCalled'); |
| input.type = 'text'; |
| shouldBeFalse('focusoutCalled'); |
| |
| </script> |
| </body> |
| </html> |