One thing I thought was if you click on a heading it pops up the TOC container (same as webrtc) at the bottom and closes the TOC container when a user clicks on an item to visit or shortly after?? Also if a user starts editing a heading it should immediately close the TOC container.