Properly listen to 'popupshowing' event