Fixed #2210 by adding a workaround for apparent failure of event.isPopupTrigger()

To avoid reigniting #2103, this is only activated on Windows.