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