From cc1939621e7e0c1075596043b794b0c17eb447c3 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Wed, 3 Oct 2012 14:24:01 +0300 Subject: Firefox now uses the overflow autofix + made sure we don't trigger a layout phase while running another layout phase #9845 Change-Id: I5a5bdf5ffdf84f86054f3f6f1d79737e630e41cb --- client/src/com/vaadin/client/BrowserInfo.java | 4 ++-- client/src/com/vaadin/client/ui/ui/VUI.java | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/BrowserInfo.java b/client/src/com/vaadin/client/BrowserInfo.java index e32e9b65f0..fab393eedc 100644 --- a/client/src/com/vaadin/client/BrowserInfo.java +++ b/client/src/com/vaadin/client/BrowserInfo.java @@ -1,4 +1,4 @@ -/* +/* * Copyright 2011 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not @@ -327,7 +327,7 @@ public class BrowserInfo { * otherwise false */ public boolean requiresOverflowAutoFix() { - return (getWebkitVersion() > 0 || getOperaVersion() >= 11) + return (getWebkitVersion() > 0 || getOperaVersion() >= 11 || isFirefox()) && Util.getNativeScrollbarSize() > 0; } diff --git a/client/src/com/vaadin/client/ui/ui/VUI.java b/client/src/com/vaadin/client/ui/ui/VUI.java index 8d534053ed..096b0b60ba 100644 --- a/client/src/com/vaadin/client/ui/ui/VUI.java +++ b/client/src/com/vaadin/client/ui/ui/VUI.java @@ -37,6 +37,7 @@ import com.vaadin.client.BrowserInfo; import com.vaadin.client.ComponentConnector; import com.vaadin.client.ConnectorMap; import com.vaadin.client.Focusable; +import com.vaadin.client.LayoutManager; import com.vaadin.client.VConsole; import com.vaadin.client.ui.ShortcutActionHandler; import com.vaadin.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; @@ -286,7 +287,12 @@ public class VUI extends SimplePanel implements ResizeHandler, sendClientResized(); - connector.getLayoutManager().layoutNow(); + LayoutManager layoutManager = connector.getLayoutManager(); + if (layoutManager.isLayoutRunning()) { + layoutManager.layoutLater(); + } else { + layoutManager.layoutNow(); + } } } -- cgit v1.2.3