My attempts at debugging this haven’t gotten me a lot further. Somewhere between clicking on the tab and the tab loading, the iFrame is getting lost.
I added a function to call in the tab’s click event. Using the browser debugger I can tell that by the time that function is called, the iframe contents is lost. The call stack doesn’t reveal much and there are no warnings or errors in the console.
The odd thing is that this works fine in the display form, just not in the edit form.
I’ve tried loading different pages in the iframe, but that doesn’t affect it. I’ve attached a before and after image of the DOM to show what’s happening.