summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMatti Tahvonen <matti@vaadin.com>2013-11-12 17:12:30 +0200
committerMatti Tahvonen <matti@vaadin.com>2013-11-12 17:31:20 +0200
commit9be3b40801a73edae8b96c03670d8d2d029f0ee5 (patch)
tree20990c314ab933ae3a5e52b616c35cdc3d1b5218 /client
parent011a2a0c9d8eac77e17a5a31b6ddd9ea243209d8 (diff)
downloadvaadin-framework-9be3b40801a73edae8b96c03670d8d2d029f0ee5.tar.gz
vaadin-framework-9be3b40801a73edae8b96c03670d8d2d029f0ee5.zip
Workaround for missing value change event in chrome (#10109)
Change-Id: I019527041539fcd0083261b693767144492e626a
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VNativeSelect.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VNativeSelect.java b/client/src/com/vaadin/client/ui/VNativeSelect.java
index 650ff7731a..04cc9e6624 100644
--- a/client/src/com/vaadin/client/ui/VNativeSelect.java
+++ b/client/src/com/vaadin/client/ui/VNativeSelect.java
@@ -21,6 +21,7 @@ import java.util.Iterator;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.user.client.ui.ListBox;
+import com.vaadin.client.BrowserInfo;
import com.vaadin.client.UIDL;
public class VNativeSelect extends VOptionGroupBase implements Field {
@@ -98,6 +99,21 @@ public class VNativeSelect extends VOptionGroupBase implements Field {
// remove temporary empty item
select.removeItem(0);
firstValueIsTemporaryNullItem = false;
+ /*
+ * Workaround to achrome bug that may cause value change event not
+ * to fire when selection is done with keyboard.
+ *
+ * http://dev.vaadin.com/ticket/10109
+ *
+ * Problem is confirmed to exist only on Chrome-Win, but just
+ * execute in for all webkits. Probably exists also in other
+ * webkits/blinks on windows.
+ */
+ if (BrowserInfo.get().isWebkit()) {
+ select.getElement().blur();
+ select.getElement().focus();
+ }
+
}
}