| var copySection = document.getElementById("copySection"); |
| var pasteSection = document.getElementById("pasteSection"); |
| var selection = window.getSelection(); |
| selection.selectAllChildren(copySection); |
| document.execCommand("Copy"); |
| selection.setPosition(pasteSection, 0); |
| document.execCommand("Paste"); |
| console.log((pasteSection.firstChild.style.getPropertyValue("float") != "left") |
| ? "SUCCESS: paste DID NOT keep float:left style." |
| : "FAILED: paste DID keep float:left style."); |
| .floatLeft { float:left } |
| <p>This test is to see if text within a floating block is put onto the paste board wihtout the float style.</p> |
| <div style="clear:both"><br>---<br></div> |
| <div contenteditable="true" id="pasteSection">---</div> |