fix bug 1046511 - Don't close TOC without user consent
Merge pull request #2614 from darkwing/toc-1046511

fix bug 1046511 - Don't close TOC without user consent