When you compile a function/procedure/package and have errors and click on the errors to go to the place in the code they're from, it's opening a new tab. The new tab is linked to the old tab, because if you close it, then all tabs are closed (found that out the hard way when I lost some code); however, the new tab doesn't know about the connection the old tab was using.
I've learned to work around this by avoiding clicking on the errors when the location of the problem is obvious or just closing the file and re-opening after several tabs get open. I couldn't find where this was reported recently though so I wanted to mention it.
I've noticed this both on my Mac and on Windows 7.
So it does NOT happen in a procedure editor but DOES happen in a worksheet?
However, you only see errors in the worksheet if you use 'SHOW ERRORS' and those error messages in the Script Output panel aren't clickable. So I'm not sure what you mean by 'click on the error in the compiler.'
I am having the same issue. When writing some pl/sql code in the worksheet, after compilation and clicking on one of the displayed errors within Compiler-Log panel, a new copy of the worksheet is opened as a new tab and the connection is lost (empty drop-down box in top-right corner). It is very annoying.