After all, there is some difference in the way we 'click' using our mouse at some place in the document, and what can be achieved by the dispatchEvent "click" in Firefox.
I noticed that when I click on any area outside the two frames, it works again. Idea : "Why not do a setTimeOut or setInterval sort of thing, which just sits and keeps on clicking on a place outside the frames"? Good idea, but doesn't work. Why? Is installing the same kind of key handlers in both the frames the only other way? Even setting focus on an element on the parent page doesn't work. Please help.
You should focus() the frames (or the parent, it is not quite clear for me) window whenever you want to. Or, as I said, you may capture the event (on each document) and decide what to do next, accordingly.
Catching the onclick event in each frame is one solution, but that will involve a lot of work. I was thinking of a simple solution if possible.