]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #3721, avoid going into prompting mode even when field is focused
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 17 Nov 2009 13:18:35 +0000 (13:18 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 17 Nov 2009 13:18:35 +0000 (13:18 +0000)
svn changeset:9843/svn branch:6.2

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

index c349497aa3286d4aad898c39801d42b36ee6e7c9..35ba8104844865be576ab9266dad6351a70fc76b 100644 (file)
@@ -756,13 +756,19 @@ public class VFilterSelect extends Composite implements Paintable, Field,
                 && uidl.getStringArrayVariable("selected").length == 0) {
             // select nulled
             if (!filtering || !popupOpenerClicked) {
-                /*
-                 * client.updateComponent overwrites all styles so we must
-                 * ALWAYS set the prompting style at this point, even though we
-                 * think it has been set already...
-                 */
-                prompting = false;
-                setPromptingOn();
+                if (!focused) {
+                    /*
+                     * client.updateComponent overwrites all styles so we must
+                     * ALWAYS set the prompting style at this point, even though
+                     * we think it has been set already...
+                     */
+                    prompting = false;
+                    setPromptingOn();
+                } else {
+                    // we have focus in field, prompting can't be set on,
+                    // instead just clear the input
+                    tb.setValue("");
+                }
             }
             selectedOptionKey = null;
         }