return;
}
isShowing = true;
// Attach the popup to the body.
final JsElement popup = getView().popup.cast();
if (popup.getParentElement() == null) {
// Hide the popup so it can enter its initial state without flickering.
popup.getStyle().setVisibility("hidden");
Elements.getBody().appendChild(popup);
}
// Start the animation after the element is attached.
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
// The popup may have been hidden before this timer executes.
if (isShowing) {
popup.getStyle().removeProperty("visibility");
getView().setShowing(true);
if (selectAndFocusElement != null) {
selectAndFocusElement.select();
selectAndFocusElement.focus();
}