Avoid style recomputation when forwarding a focus event to an text field's input...
[WebKit-https.git] / LayoutTests / fast / forms / change-input-type-in-focus-handler.html
1 <!DOCTYPE html>
2 <html>
3 <div id="div">
4     <form id="form">
5         <input id="input" onfocus="focused()" type="tel"></input>
6     </form>
7 </div>
8
9 <script>
10 function focused() {
11     if (input.autofocus) {
12         input.type = "checkbox";
13         document.body.innerHTML = "<code style='color: green'>PASS</code>";
14         return;
15     }
16
17     document.body.appendChild(input);
18     input.autofocus = true;
19 }
20
21 if (window.testRunner)
22     testRunner.dumpAsText();
23
24 input.focus();
25 </script>
26 </html>