Safari onMouseUp event

P

peter.chase

I have been trying to implement drag and drop in a Web interface, using
JavaScript. I have written my own, rather than use a library, because
the drag and drop has to play nicely with a table row
multiple-selection library that I also wrote.

I care about Internet Explorer 6+, FireFox 2+ and Safari 2+. It works
fine on the first two, but not on Safari.

The problem seems to be that Safari fires the onMouseUp event on the
element that was under the mouse when the mouse button went down. In
drag and drop, one has typically moved the mouse to a different element
(the drop target) by the time the mouse button comes up. On the other
browsers, the event fires on that element.

Is there any way to find out what element was under the mouse when the
button came up? I have tried the relatedTarget, currentTarget and
target attributes of the event, but so far not found what I want.

If not, any suggestions on how to make this work on Safari?

I notice Safari has its own non-standard (but IE-like?) events for drag
and drop. However, I don't really want to use those because (a) they
are non-standard so different code would be needed for different
browsers, (b) it probably wouldn't play nicely with my
multiple-selection library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top