Firefox (78.0.2) is preventing my 2011 MacBook Pro (OS 10.13.6) from going to sleep. I can put it to sleep manually but no matter how few windows or tabs are open, it won’t sleep automatically. I’m not sure but I think this started after the most recent Firefox update.
So if you Quit Firefox, macOS will sleep on idle but if Firefox is running, even with no page but about:blank open, it won’t? It is supposed to be possible for a browser to prevent a computer from going to sleep but only in specific circumstances (e.g. playing video in full screen mode).
What if you disable all your browser extensions (go to Help > Restart with addons disabled) and have nothing but about:blank open, any change?
Have you shut down or restarted your Mac since Firefox last updated?
During further investigations I noticed that the kernel_task process was taking up 30-50% of the CPU. Some Googling seemed to recommend that I reset the SMC so I did that (I was having a lot of fan activity also). I had to do a restart as part of that process so I can’t be sure what solved the sleep problem but it seems to be OK now.