After copy and paste, cursor may appear to be above the bottom of content
[WebKit-https.git] / LayoutTests / editing / pasteboard / copy-paste-inserts-clearing-div.html
1 <html>
2 <head>
3 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
4 <script type="text/javascript" src="../../resources/dump-as-markup.js"></script>
5 </head>
6 <body>
7 Before
8 <div style="position: absolute; top: 0px; right: 0px; width: 100px; height: 100px; background: yellow;"></div>
9 <div style="float: right; width: 200px; height: 200px; background: blue;"></div>
10 After
11
12 <script>
13
14 Markup.description('This tests to see if floating elements cause a clearing element to be inserted upon copy/paste');
15
16 document.designMode = 'on';
17
18 if (window.internals)
19     window.internals.settings.setShouldConvertPositionStyleOnCopy(true);
20
21 var s = window.getSelection();
22
23 Markup.dump('test1', 'first test - before');
24 document.execCommand("SelectAll");
25 document.execCommand("Cut");
26 document.execCommand("Paste");
27 Markup.dump('test1', 'first test - after');
28
29 </script>
30 </body>
31 </html>