Click outside popups to dismiss them. Fix focus display of active tabs.