The following example opens a popup directly during the page initialization.
This causes a "loading..." mask that does not disappear.
The problem only exists when the popup has an onOpen-listener.
The workaround is to postpone the popup.open() to the next ajax event
e.g. using echo events or an onAfterSize listener with will have a similar effect