Control popup order

With a minimum code change it is possible to control the popup order when clicking them.