jsfiddle.net/5cyqC/3 click here and then click on Server Error oe anywhere else... and then see
You are setting the focus to the content of an iframe.
This is a separate document and events do not bubble out of it into the parent document.
If you want to capture events from it, you will need to bind the event handlers to the document loaded in the frame.
The Same Origin Policy will apply.
See this question for questions about communicating across iframes when the same origin policy blocks normal communication.
Note that there is no way to work around it from only one side as this would be a major security flaw. (For example, someone could put a banking website in a frame and then listen for keypress events in the bank's form to steal passwords.)