4 https://bugzilla.mozilla.org/show_bug.cgi?id=596506
7 <title>Test for Bug
596506</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
10 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=596506">Mozilla Bug
596506</a>
15 <div id=
"content" style=
"display: none">
19 <script type=
"application/javascript">
21 /** Test for Bug
596506 **/
23 SimpleTest.waitForExplicitFinish();
24 SimpleTest.waitForFocus(runTest);
26 const kIsMac = navigator.platform.includes(
"Mac");
30 var edit = document.getElementById(
"edit");
34 synthesizeKey(
"KEY_Enter");
36 synthesizeKey(
"KEY_ArrowUp");
37 synthesizeKey(
"KEY_ArrowUp");
39 synthesizeKey(
"KEY_ArrowRight", { accelKey: true });
41 synthesizeKey(
"KEY_End");
44 is(edit.value,
"Firstly\nSecond",
45 "Pressing end should position the cursor before the terminating newline");
52 <textarea id=
"edit"></textarea>