CORE-5886: Close active window shortcut fixed. Removed unnecessary event. Added unit test to ensure that the close active window behavior remains correct.