I have a main program (some sort of testing control panel) that runs another program in an IFrame. In some sorts, this is similar to Storybook. The reason to have an IFrame is to provide some separation between the program that is tested (which may do what it wants with its DOM) and the host w/ the control panel = buttons & co.
I was surprised to observe that if I have in the IFrame a dropdown, and I click somewhere but OUTSIDE that IFrame => the dropdown closes. So practically the code in the IFrame has reacted to an event that happened in the parent window. (NOTE: the page in the IFrame comes from the same domain).
This is something that I don't bothers me. Any ideas why this happens and what can I do to avoid this? So I'd like the code in the IFrame to stop receiving/reacting events that correspond to actions that I do outside the IFrame.