summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/com/vaadin/client/ui/VUI.java3
-rw-r--r--client/src/com/vaadin/client/ui/ui/UIConnector.java22
2 files changed, 12 insertions, 13 deletions
diff --git a/client/src/com/vaadin/client/ui/VUI.java b/client/src/com/vaadin/client/ui/VUI.java
index 4817bf9304..ba3495743d 100644
--- a/client/src/com/vaadin/client/ui/VUI.java
+++ b/client/src/com/vaadin/client/ui/VUI.java
@@ -101,9 +101,6 @@ public class VUI extends SimplePanel implements ResizeHandler,
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;
/** For internal use only. May be removed or replaced in the future. */
diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java
index 8813d70609..149d99de17 100644
--- a/client/src/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java
@@ -130,11 +130,16 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
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);
}
}
});
@@ -192,7 +197,6 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
@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;
@@ -285,9 +289,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
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;
}
@@ -397,7 +400,6 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
}
});
}
- getWidget().rendering = false;
}
/**