Fixed #4933. Hides controller table of contents if you click outside controller or press esc.