Fixed scrolling issue after uploading (issue #2442)
authorChristos Stathis <chstath@ebs.gr>
Fri, 25 May 2012 09:02:04 +0000 (12:02 +0300)
committerChristos Stathis <chstath@ebs.gr>
Fri, 25 May 2012 09:02:04 +0000 (12:02 +0300)
src/gr/grnet/pithos/web/client/FileList.java

index d927970..bcd0cd2 100644 (file)
@@ -673,10 +673,14 @@ public class FileList extends Composite {
                        selectionModel.setSelected(f, false);
                
                int i = 0;
+               boolean scrolled = false;
                for (File f : files) {
                        if (selectedUrls.contains(app.getApiPath() + f.getOwner() + f.getUri())) {
                                selectionModel.setSelected(f, true);
-                               celltable.getRowElement(i).scrollIntoView();
+                               if (!scrolled) {
+                                       celltable.getRowElement(i).getCells().getItem(0).scrollIntoView();
+                                       scrolled = true;
+                               }
                        }
                        i++;
                }