diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VUI.java | 3 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/ui/UIConnector.java | 22 |
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 1a84613a5d..590263a5ed 100644 --- a/client/src/com/vaadin/client/ui/VUI.java +++ b/client/src/com/vaadin/client/ui/VUI.java @@ -103,9 +103,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 2a4a9824d8..d0f3c8603f 100644 --- a/client/src/com/vaadin/client/ui/ui/UIConnector.java +++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java @@ -126,11 +126,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); } } }); @@ -188,7 +193,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; @@ -281,9 +285,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; } @@ -393,7 +396,6 @@ public class UIConnector extends AbstractSingleComponentContainerConnector } }); } - getWidget().rendering = false; } /** |