popupMenu.js: Filter out button-release events while a popup is opening,
to avoid unintentional selection of popup items due to busy event handling.

Fixes #3294
Fixes #3331
Fixes #3116
Fixes #3221