Popups events fires when turning mobile.

Popups events fires when turning mobile.

I am creating a list in a popup window and i´m trying to add/remove stuff from the list when the popup shows. But i noticed that if i turn the mobile the popups popupbeforeposition and popupafteropen fires off.

Is this a bug? This makes it really difficult to add stuff to a popup window dynamically.