Sometimes when I have the Database Console open (the kind that shows query results) it will unexpectedly close when I click anywhere outside the view. In addition to the annoyance of having to reopen it every time it also causes trouble when I try to double click on items in the project panel when the Database Console is open. The first click closes the console, then if the project view is already scrolled to the bottom it will reposition all the items and the second click will no longer be over the item I originally clicked on and I will open a random file.
It is a bit strange because this does not always happen. Most of the time the Database Console stays open until I explicitly close it, but once it starts closing in the way described above it continues to do so. Restarting the application does not fix the issue, although it will revert to the expected behavior eventually (possibly on a full reboot).
I'm not sure if this is an IntelliJ problem, DataGrip problem, or specific to PyCharm, but it only happens with the Database Console.
I'd appreciate any tips on why this might be happening or how to prevent this behavior.