// Testing KEY_ArrowDown with forward selection textarea.selectionStart = 1; textarea.selectionEnd = 1;
shiftRight(7);
synthesizeKey("KEY_ArrowDown");
is(textarea.selectionStart, 19, "caret moved to next line below selection end");
is(textarea.selectionEnd, 19, "caret moved to next line below selection end");
// Testing KEY_ArrowDown with backward selection textarea.selectionStart = 8; textarea.selectionEnd = 8;
shiftLeft(7);
synthesizeKey("KEY_ArrowDown");
is(textarea.selectionStart, 12, "caret moved to next line below selection start");
is(textarea.selectionEnd, 12, "caret moved to next line below selection start");
// Testing KEY_ArrowUp with forward selection textarea.selectionStart = 12; textarea.selectionEnd = 12;
shiftRight(7);
synthesizeKey("KEY_ArrowUp"); var result = textarea.selectionEnd
is(textarea.selectionStart, 8, "caret moved to previous line above selection end");
is(textarea.selectionEnd, 8, "caret moved to previous line above selection end");
// Testing KEY_ArrowUp with backward selection textarea.selectionStart = 19; textarea.selectionEnd = 19;
shiftLeft(7);
synthesizeKey("KEY_ArrowUp"); var result = textarea.selectionEnd
is(textarea.selectionStart, 1, "caret moved to previous line above selection start");
is(textarea.selectionEnd, 1, "caret moved to previous line above selection start");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.