blob: 779bf974047df71df3b0fcd52b47fc6d1ebf56b9 [file] [log] [blame]
megan_gardner@apple.com07573fa2019-02-06 05:52:01 +00001<html>
2<head>
3
4<style>
5.editing {
6 border: 2px solid red;
7 font-size: 24px;
8}
9.explanation {
10 border: 2px solid blue;
11 padding: 12px;
12 font-size: 24px;
13 margin-bottom: 24px;
14}
15.scenario { margin-bottom: 16px;}
16.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
17.expected-results:first-line { font-weight: bold }
18</style>
justing69044062006-05-11 01:26:20 +000019
megan_gardner@apple.comf597bed2019-02-01 23:27:30 +000020<script src="../editing.js"></script>
21<script src="../../resources/ui-helper.js"></script>
justing69044062006-05-11 01:26:20 +000022<script>
justing69044062006-05-11 01:26:20 +000023
megan_gardner@apple.com07573fa2019-02-06 05:52:01 +000024async function editingTest() {
megan_gardner@apple.comf597bed2019-02-01 23:27:30 +000025 await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test'));
26 copyCommand();
27 moveSelectionBackwardByCharacterCommand();
28 moveSelectionForwardByCharacterCommand();
29 extendSelectionForwardByLineCommand();
30 pasteCommand();
31}
megan_gardner@apple.com07573fa2019-02-06 05:52:01 +000032</script>
megan_gardner@apple.comf597bed2019-02-01 23:27:30 +000033
megan_gardner@apple.com07573fa2019-02-06 05:52:01 +000034<div class="explanation">
35<div class="scenario">
36<p>There was a bug in paste's smart replace whitespace handling. In some cases, it used information gathered at the start of the selection being pasted into to decide whether or not a space needed to be added to the end of the incoming content.</p>
37<div class="expected-results">
38Expected Results:
39<br>
40A smart paste is performed into a selection starting in one block and ending in another. Spaces should surround the pasted word and look like:
41<br>
42f foo bar
43</div>
44<div id="test" contenteditable="true"><div>foo</div><div>x bar</div></div>
45
46<script>
47runDumpAsTextEditingTest(true);
rniwa@webkit.org14f6b5b2012-06-13 08:51:53 +000048</script>