]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7647 ComboBox popup content disappears on up/down button double click
authorArtur Signell <artur.signell@itmill.com>
Thu, 17 Nov 2011 12:19:38 +0000 (12:19 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 17 Nov 2011 12:19:38 +0000 (12:19 +0000)
svn changeset:22047/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java

index fef7cd7f37d1f8813a6b2f90d0946189aa2431bf..66200cbe8c5cc2380aac6c0d117bdb01257389ac 100644 (file)
@@ -342,7 +342,20 @@ public class VFilterSelect extends Composite implements Paintable, Field,
             @Override
             public void run() {
                 if (pagesToScroll != 0) {
-                    filterOptions(currentPage + pagesToScroll, lastFilter);
+                    if (!waitingForFilteringResponse) {
+                        /*
+                         * Avoid scrolling while we are waiting for a response
+                         * because otherwise the waiting flag will be reset in
+                         * the first response and the second response will be
+                         * ignored, causing an empty popup...
+                         * 
+                         * As long as the scrolling delay is suitable
+                         * double/triple clicks will work by scrolling two or
+                         * three pages at a time and this should not be a
+                         * problem.
+                         */
+                        filterOptions(currentPage + pagesToScroll, lastFilter);
+                    }
                     pagesToScroll = 0;
                 }
             }
@@ -351,7 +364,7 @@ public class VFilterSelect extends Composite implements Paintable, Field,
                 if (currentPage + pagesToScroll > 0) {
                     pagesToScroll--;
                     cancel();
-                    schedule(100);
+                    schedule(200);
                 }
             }
 
@@ -360,7 +373,7 @@ public class VFilterSelect extends Composite implements Paintable, Field,
                         * pageLength) {
                     pagesToScroll++;
                     cancel();
-                    schedule(100);
+                    schedule(200);
                 }
             }
         }