summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-03-18 17:00:08 +0000
committerArtur Signell <artur.signell@itmill.com>2010-03-18 17:00:08 +0000
commit83bd7fb6e77a597844f6dae0052482979fad32f6 (patch)
treefb45ea882683274dcbd1c00ee90081acb3a69100
parentf3f88b57d42e83dde1aaeac7f78cdbc6a907b827 (diff)
downloadvaadin-framework-83bd7fb6e77a597844f6dae0052482979fad32f6.tar.gz
vaadin-framework-83bd7fb6e77a597844f6dae0052482979fad32f6.zip
Fix for #4373 - Menubar causes javascript exception in IE7
svn changeset:11976/svn branch:6.2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
index 0b110889cf..40a3d74e36 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
@@ -27,7 +27,7 @@ import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
public class VMenuBar extends Widget implements Paintable,
-CloseHandler<PopupPanel>, ContainerResizedListener {
+ CloseHandler<PopupPanel>, ContainerResizedListener {
/** Set the CSS class name to allow styling. */
public static final String CLASSNAME = "v-menubar";
@@ -542,6 +542,12 @@ CloseHandler<PopupPanel>, ContainerResizedListener {
popup.getElement().getStyle().setProperty("zoom", "");
DeferredCommand.addCommand(new Command() {
public void execute() {
+ if (popup == null) {
+ // The child menu can be hidden before this command has
+ // time to run.
+ return;
+ }
+
if (popup.getElement().getStyle().getProperty("width") == null
|| popup.getElement().getStyle().getProperty(
"width") == "") {