This came up in bug 52464: after setCapturingMouseEventsNode is set and the node is moved to a different document, bizarre things happen, like events firing into the node from another document. I suspect the same things would happen with mouseUnderMouse/lastMouseUnderMouse, dragTarget, and mousePressNode. Even though this doesn't appear to be a security issue, we should fix this wierdness.
There may be a way to do this at some other level then moving between documents and cover more potential problems. For example, I’m not sure the event handler should continue tracking a node if it’s not rendered any more or not in the document tree any more. On the other hand, doing this at some other level could be risky, so maybe we should stick to doing it at the “move between documents” level.