paste-text-at-tabspan-002.html 860 Bytes
Newer Older
1 2 3 4 5 6 7 8
<!DOCTYPE html>
<html>
<body style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">
<div contenteditable id="root" style="border: 2px solid red; padding: 12px; font-size: 24px">
<span id="test">a<span class="Apple-tab-span" style="white-space:pre">			</span>z</span>
</div>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
9 10
<script>

11 12 13
var test = document.getElementById('test');
test.focus();
window.getSelection().setPosition(test, 0);
14

15 16
if (window.layoutTestController)
    layoutTestController.dumpEditingCallbacks();
17

18 19 20 21 22 23
extendSelectionForwardByCharacterCommand();
copyCommand();
for (i = 0; i < 2; i++)
	moveSelectionForwardByCharacterCommand();
pasteCommand();
typeCharacterCommand();
24

25
Markup.dump('root', 'You should see a\\tax\\t\\tz below');
26

27
</script>
28 29
</body>
</html>