better menu (and popup menu) handling (breaking change)