I have a document that contains an IFrame (all source items are from the same domain), when I attach the onmouseup event to a div in my IFrame it will fire when my mouse is up, no matter if I am still on the element with my cursor.
But if I leave the IFrame still holding my mouse down and then release, the event is not firing.
Is there some way to catch this issue, maybe know when the user it out from the IFrame with is mouse cursor
Mouse events are tied to windows and an iframe is considered a window so you won’t get that mouseup event fired to the iframe if the cursor is not on the iframe. What you could do would be to capture the parent frame’s mouseup event on the document like so.
or without jQuery
You would put this in the iframed document.