4 var tf
= document
.getElementById('tf');
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 eventSender
.keyDown('F');
9 eventSender
.keyDown('A');
10 eventSender
.keyDown('I');
11 eventSender
.keyDown('L');
17 var res
= document
.getElementById('res');
18 res
.innerHTML
= res
.innerHTML
+ msg
+ "<br>";
21 <body onload=
"test()">
22 This tests that preventing the default behavior for a keydown event will prevent the keypress event from firing, and will prevent text from being inserted.
<br>
23 This matches IE7, but not Firefox, which still dispatches a keypress.
<br>
24 <input id=
"tf" onkeydown=
"log('key down'); return false" onkeypress=
"log('key press')">