summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2009-10-27 15:38:05 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2009-10-27 15:38:05 +0000
commitc0e9e16c3fe44b7ed555ac6a5681d8df9d45b0e2 (patch)
tree17b9bae176fdc4a210a233f06505fad66ca9be47 /src/com/vaadin
parent44f5e4a252a8053dece47f94556af82643ec3874 (diff)
downloadvaadin-framework-c0e9e16c3fe44b7ed555ac6a5681d8df9d45b0e2.tar.gz
vaadin-framework-c0e9e16c3fe44b7ed555ac6a5681d8df9d45b0e2.zip
merged [9413],[9414] from 6.1
svn changeset:9415/svn branch:6.2
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java13
-rw-r--r--src/com/vaadin/ui/LoginForm.java27
2 files changed, 36 insertions, 4 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java
index 52529ed468..c05f1c06d3 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java
@@ -16,6 +16,7 @@ import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.HTML;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
+import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
@@ -214,10 +215,14 @@ public class VEmbedded extends HTML implements Paintable {
@Override
protected void onDetach() {
- // Force browser to fire unload event when component is detached from
- // the view (IE doesn't do this automatically)
- if (browserElement != null) {
- DOM.setElementAttribute(browserElement, "src", "javascript:false");
+ if (BrowserInfo.get().isIE()) {
+ // Force browser to fire unload event when component is detached
+ // from
+ // the view (IE doesn't do this automatically)
+ if (browserElement != null) {
+ DOM.setElementAttribute(browserElement, "src",
+ "javascript:false");
+ }
}
super.onDetach();
}
diff --git a/src/com/vaadin/ui/LoginForm.java b/src/com/vaadin/ui/LoginForm.java
index 53035083ef..33ee670f4b 100644
--- a/src/com/vaadin/ui/LoginForm.java
+++ b/src/com/vaadin/ui/LoginForm.java
@@ -243,6 +243,9 @@ public class LoginForm extends CustomComponent {
private static final Method ON_LOGIN_METHOD;
+ private static final String UNDEFINED_HEIGHT = "140px";
+ private static final String UNDEFINED_WIDTH = "200px";
+
static {
try {
ON_LOGIN_METHOD = LoginListener.class.getDeclaredMethod("onLogin",
@@ -272,4 +275,28 @@ public class LoginForm extends CustomComponent {
removeListener(LoginEvent.class, listener, ON_LOGIN_METHOD);
}
+ @Override
+ public void setWidth(float width, int unit) {
+ super.setWidth(width, unit);
+ if (iframe != null) {
+ if (width < 0) {
+ iframe.setWidth(UNDEFINED_WIDTH);
+ } else {
+ iframe.setWidth("100%");
+ }
+ }
+ }
+
+ @Override
+ public void setHeight(float height, int unit) {
+ super.setHeight(height, unit);
+ if (iframe != null) {
+ if (height < 0) {
+ iframe.setHeight(UNDEFINED_HEIGHT);
+ } else {
+ iframe.setHeight("100%");
+ }
+ }
+ }
+
}