3 https://bugzilla.mozilla.org/show_bug.cgi?id=1399722
7 <title>Test for Bug
1399722</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1399722">Mozilla Bug
1399722</a>
15 <div id=
"content" style=
"display: none;">
19 <input spellcheck=
"true" onkeypress=
"if (event.key=='Enter')this.value='';">
22 <script class=
"testbody" type=
"application/javascript">
23 SimpleTest.waitForExplicitFinish();
24 SimpleTest.waitForFocus(function() {
25 let elm = document.querySelector(
"input");
29 synthesizeKey(
"KEY_Enter");
31 is(elm.value,
"CD",
"Can type into the textbox successfully after the onkeypress handler deleting the value");