/** stored height of parent for embedded application auto-resize */
private int parentHeight;
- /** For internal use only. May be removed or replaced in the future. */
- public boolean rendering;
-
/** For internal use only. May be removed or replaced in the future. */
public boolean immediate;
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
- if (sessionExpired) {
- getConnection().showSessionExpiredError(null);
- } else {
- getState().enabled = false;
- updateEnabledState(getState().enabled);
+ // Only notify user if we're still running and not eg.
+ // navigating away (#12298)
+ if (getConnection().isApplicationRunning()) {
+ if (sessionExpired) {
+ getConnection().showSessionExpiredError(null);
+ } else {
+ getState().enabled = false;
+ updateEnabledState(getState().enabled);
+ }
+ getConnection().setApplicationRunning(false);
}
}
});
@Override
public void updateFromUIDL(final UIDL uidl, ApplicationConnection client) {
ConnectorMap paintableMap = ConnectorMap.get(getConnection());
- getWidget().rendering = true;
getWidget().id = getConnectorId();
boolean firstPaint = getWidget().connection == null;
getWidget().connection = client;
childIndex++;
}
if (isClosed) {
- // don't render the content, something else will be opened to this
- // browser view
- getWidget().rendering = false;
+ // We're navigating away, so stop the application.
+ client.setApplicationRunning(false);
return;
}
}
});
}
- getWidget().rendering = false;
}
/**