OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 body { | 4 body { |
5 -webkit-user-select: none; | 5 -webkit-user-select: none; |
6 } | 6 } |
7 | 7 |
8 .editing { | 8 .editing { |
9 border: 2px solid red; | 9 border: 2px solid red; |
10 padding: 12px; | 10 padding: 12px; |
11 font-size: 24px; | 11 font-size: 24px; |
12 -webkit-user-select: text; | 12 -webkit-user-select: text; |
13 -webkit-user-modify: read-write-plaintext-only; | 13 -webkit-user-modify: read-write-plaintext-only; |
14 } | 14 } |
15 </style> | 15 </style> |
16 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></sc
ript> | 16 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></sc
ript> |
17 <script> | 17 <script> |
18 function editingTest() { | 18 function editingTest() { |
19 if (window.testRunner) | 19 if (window.testRunner) |
20 testRunner.dumpAsText(); | 20 testRunner.dumpAsText(); |
21 | 21 |
22 document.getElementById('tf').focus(); | 22 document.getElementById('tf').select(); |
23 copyCommand(); | 23 copyCommand(); |
24 | 24 |
25 document.getElementById('root').focus(); | 25 document.getElementById('root').focus(); |
26 pasteCommand(); | 26 pasteCommand(); |
27 } | 27 } |
28 </script> | 28 </script> |
29 </head> | 29 </head> |
30 <body onload="runEditingTest();"> | 30 <body onload="runEditingTest();"> |
31 This tests that you can paste into a plain-text editable area even if th
e body has user-select:none set on it. | 31 This tests that you can paste into a plain-text editable area even if th
e body has user-select:none set on it. |
32 <input id="tf" value="Test Passed"> | 32 <input id="tf" value="Test Passed"> |
33 <div id="root" class="editing"></div> | 33 <div id="root" class="editing"></div> |
34 </body> | 34 </body> |
35 </html> | 35 </html> |
OLD | NEW |