43 lines
868 B
HTML
43 lines
868 B
HTML
<html>
|
|
<head>
|
|
|
|
<style>
|
|
.editing {
|
|
border: 2px solid red;
|
|
padding: 12px;
|
|
font-size: 24px;
|
|
}
|
|
</style>
|
|
<script src="../editing.js" language="JavaScript" type="text/JavaScript" ></script>
|
|
|
|
<script>
|
|
|
|
function editingTest() {
|
|
moveSelectionForwardByWordCommand();
|
|
moveSelectionForwardByCharacterCommand();
|
|
moveSelectionForwardByCharacterCommand();
|
|
moveSelectionForwardByCharacterCommand();
|
|
deleteCommand();
|
|
deleteCommand();
|
|
forwardDeleteCommand();
|
|
forwardDeleteCommand();
|
|
undoCommand();
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div contenteditable id="root" class="editing">
|
|
<span id="test">This word should be selected, since the test deleted it a character at a time and then did an undo.</span>
|
|
</div>
|
|
|
|
<script>
|
|
if (window.internals)
|
|
internals.settings.setEditingBehavior("mac");
|
|
runEditingTest();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|