An "are you sure you want to exit" popup would be really great. Anyone that uses shortcuts frequently (like myself) must end up closing the tab accidentally all the time, as I do.
It's not ideal in many embed cases but perhaps on a per-account basis or some clever way? IMO it should be shown even without unedited files.