On Apr 3, 12:46 pm, "MikeK" <mike...@hotmail.com> wrote:
> Hi rob,
> This example should show that dragover and drop don't work under
> Safari on textareas.
I can't test Safari right now, but the following link say it is
supported:
<URL:
http://developer.apple.com/documenta...ts.onDragEnter
>
Incidentally, the ondrag methods are MS proprietary, and therefore
should not be relied upon on the web in general. Try them in Firefox
and Opera.
> There are three event handler sections, and you
> can uncomment each section to illustrate the behaviors I talk about
> above. (Only the border responding to behaviors, that absolutely
> positioned elements above textareas can't fire these events, and that
> the events are sunk and don't propagate to the document/body event
> handler). I'm fairly certain this is a bug with Safari, I'm just
> amazed there isn't more noise about it online. I added some comments
> to the WebKit bugzilla tracker with these details.
Why? Most drag stuff is implemented using cross-browser libraries
rather than depending on mimicking IE's methods. There are plenty
around, including Yahoo!, walterzorn.com, jQuery, etc.
>
> <div>
> Here's some text to drag around.
> <a href="#">Here's a link to drag around.</a>
> </div>
>
> <textarea id="target" style="height:200px; width: 400px">Target</
> textarea>
> <textarea id="eventlog" style="height:200px; width: 200px"></textarea>
> <div id="uppertarget" style="position:absolute; z-index:100; top:
> 150px; left:150px; height:150px; width:150px; color:#000;
> background:#900"> An element above the textarea </div>
>
> <script>
>
> mesg = document.getElementById("eventlog");
> tgt = document.getElementById("target");
> u_tgt = document.getElementById("uppertarget");
> function displayEvent(e) {
// Needed for IE
var e = e || window.event;
> mesg.value+=e.type+"\t\t"+e.srcElement+"\n";}
--
Rob