summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-06-05 10:08:21 +0300
committerArtur Signell <artur@vaadin.com>2013-06-05 12:13:14 +0300
commitd647d7a48a70cf6d4d86500311e235e0778c7dab (patch)
tree094b693f71983858d6a35de3202a04be42a44184 /client
parent3c8a3bfcab674e791dc8e91ec5038b7e7e5257d0 (diff)
downloadvaadin-framework-d647d7a48a70cf6d4d86500311e235e0778c7dab.tar.gz
vaadin-framework-d647d7a48a70cf6d4d86500311e235e0778c7dab.zip
Ensure VBrowserFrame content is unloaded in IE (#11683)
Change-Id: Ic3850bf00a1cfbdae6a955256509f0389fadaaa5
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VBrowserFrame.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VBrowserFrame.java b/client/src/com/vaadin/client/ui/VBrowserFrame.java
index c1e131a6c5..4e13921582 100644
--- a/client/src/com/vaadin/client/ui/VBrowserFrame.java
+++ b/client/src/com/vaadin/client/ui/VBrowserFrame.java
@@ -19,6 +19,7 @@ import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.IFrameElement;
import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.client.BrowserInfo;
public class VBrowserFrame extends Widget {
@@ -134,4 +135,23 @@ public class VBrowserFrame extends Widget {
iframe.setName(name);
}
}
+
+ @Override
+ protected void onDetach() {
+ if (BrowserInfo.get().isIE()) {
+ // Force browser to fire unload event when component is detached
+ // from the view (IE doesn't do this automatically)
+ if (iframe != null) {
+ /*
+ * src was previously set to javascript:false, but this was not
+ * enough to overcome a bug when detaching an iframe with a pdf
+ * loaded in IE9. about:blank seems to cause the adobe reader
+ * plugin to unload properly before the iframe is removed. See
+ * #7855
+ */
+ iframe.setSrc("about:blank");
+ }
+ }
+ super.onDetach();
+ }
}