Actually, if you want to keep it, you can move this code in `display` that is ensured to be called after the panel xbl has been applied (i.e. after openPopup method is binded to DOM object)