]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #1891 Changing alignment from left to center to right bugs in IOrderedLayoutVer...
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Thu, 3 Jul 2008 12:52:52 +0000 (12:52 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Thu, 3 Jul 2008 12:52:52 +0000 (12:52 +0000)
svn changeset:5028/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java

index 2d73acc72c1c5544f8367078d1cfa7f10729f6a7..d0d8cb5f1fd0149bc3da8bf40d320cdc5e328300 100644 (file)
@@ -392,8 +392,21 @@ public abstract class IOrderedLayout extends Panel implements Container {
                     }
 
                     DOM.appendChild(getElement(), table);
+                } else {
+
+                    // Go around optimization bug in WebKit and ensure repaint
+                    if (BrowserInfo.get().isSafari()) {
+                        String prevValue = DOM.getElementAttribute(td, "align");
+                        if (!horizontalAlignment.equals(prevValue)) {
+                            Element parent = DOM.getParent(td);
+                            DOM.removeChild(parent, td);
+                            DOM.appendChild(parent, td);
+                        }
+                    }
+
                 }
                 DOM.setElementAttribute(td, "align", horizontalAlignment);
+
             } else if (td != null) {
 
                 // In this case we are requested to position this left