153.xhtml (596B)
1 <?xml version="1.0" encoding="utf-8"?> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>Dropping selection from text input into readonly text input</title> 5 <style type="text/css"> 6 input 7 {padding:1em; 8 width:300px;} 9 </style> 10 </head> 11 <body onload="document.querySelector('input').select()"> 12 <p><input value="Drag me"/></p> 13 <p>Try to drag selected text into the input below. You should not be able to drop it here.</p> 14 <p><input readonly="readonly" placeholder="Try to drop selected text here" onchange="document.querySelector('p+p').firstChild.nodeValue = 'FAIL'"/></p> 15 </body> 16 </html>