Detect missed mouseup events and correct for them

This can happen with a context menu opens, or when dragging and releasing over an iframe