]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #1882 (loading indicator position)
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 5 Aug 2008 09:23:13 +0000 (09:23 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 5 Aug 2008 09:23:13 +0000 (09:23 +0000)
svn changeset:5138/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java

index 10313d289c77979e43778f917fddd7af93b40fc8..a65f5645203360774de78b32f88af3b1b2f5f8d1 100755 (executable)
@@ -344,13 +344,15 @@ public class ApplicationConnection {
                     DOM.setElementProperty(loadElement, "className",
                             "i-loading-indicator");
                     DOM.setStyleAttribute(loadElement, "display", "block");
-                    DOM.setStyleAttribute(loadElement, "left", (view
-                            .getAbsoluteLeft()
+                    final int updatedX = Window.getScrollLeft()
+                            + view.getAbsoluteLeft()
                             + view.getOffsetWidth()
                             - DOM.getElementPropertyInt(loadElement,
-                                    "offsetWidth") - 5)
-                            + "px");
-
+                                    "offsetWidth") - 5;
+                    DOM.setStyleAttribute(loadElement, "left", updatedX + "px");
+                    final int updatedY = Window.getScrollTop() + 6
+                            + view.getAbsoluteTop();
+                    DOM.setStyleAttribute(loadElement, "top", updatedY + "px");
                     // Initialize other timers
                     loadTimer2 = new Timer() {
                         public void run() {