prevent re-layout while closing an ebook (fixes issue 2625)
hide sidebar later when closing the last document