Fix another issue where the right-click menu would not close.