Windows: fixed an issue where double-click to collapse could be triggered even while another item is active. (#7841, #7369)