tags:

views:

842

answers:

6

If the user does a "onmousedown" inside a iframe, drags outside the iframe and hovers over elements that have a "onmouseover" attached to them - safari does not fire this event.

I have a slightly unconventional drag n drop setup. The items that can be "dragged" are inside a iframe. The drop targets are outside the iframe. If the drag starts inside the iframe the "onmouseover" handler of the drop targets is not fired in Safari. Is this a known issue? Are there any workarounds available?

Currently i do not need to keep track of the locations of my drop targets for other browsers. If a "mouseup" happens, while "dragging", i can find the exact drop target from the event object. The drop indication is taken care by the "onmouseover" function.

A: 

Offhand, I don't think anything fires this event. It's two completely separate DOMs.

Have you tried this in FF, IE, Opera, Chrome?

annakata
Yes, Other browsers do fire "onmouseover" on other DOMs, no matter on which DOM the "onmousedown" happened. In fact Safari behaviour is different for "hover" on anchor elements too. Safari does not fire the "hover" effect when dragging, no matter from within an iframe or not.
+1  A: 

IE and Firefox fire the onmouseover event just fine. I'm doing something similar dragging from the parent doc to drop targets in the iframe and can see the onmouseover events fire for the targets in IE and FireFox but not Safari. Any workarounds out there?

+1  A: 

Hi, I just wanted to say that I'm experiencing the exact same problem on a system we are building. I have the problem in Chrome and Safari, but not in IE, Opera or Firefox.

+1  A: 

Hi, I just wanted to say that I'm experiencing the exact same problem

Me too. Did anyone find a solution yet?

Stephan
A: 

Got the same problem. I bind $(frame.contentWindow).mousemove(function(e){/stuff/}) using jQuery but haven't had any luck getting the event to fire. It works fine in Firefox but get's nothing in Chrome.

download
A: 

Does anybody find a solution for this?

brusch