testing/web-platform/tests/html/editing/dnd/selection/004.xhtml
author Sandor Molnar <smolnar@mozilla.com>
Thu, 29 Sep 2022 04:48:26 +0300
changeset 636564 59ab3186dfd4016b98a1dc97ea9ba146cb9f7abc
parent 388141 f95a678186b46649eee6cf8c6adbdf46c320f300
permissions -rw-r--r--
Backed out 2 changesets (bug 1774317) for causing top-crash (bug 1792767) CLOSED TREE Backed out changeset 418dec4ac3f9 (bug 1774317) Backed out changeset 329666086b40 (bug 1774317)

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Selection drag and drop from url input to block element</title>
<style type="text/css">
div[ondragenter]
  {width:300px;
  height:100px;
  margin-top:20px;
  padding:10px;
  color:white;
  background-color:navy;}
</style>
</head>
<body onload="document.querySelector('input').select()">
<p>Drag selected url to the blue box. Copy of selection should end up in the blue box once you drop it there.</p>
<p><input type="url" value="http://example.org"/></p>
<div
  ondragenter="event.preventDefault()"
  ondragover="return false"
  ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))"
/>
</body>
</html>