aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorrogozinds <rogozinds@gmail.com>2016-12-20 22:06:31 -0800
committerHenri Sara <henri.sara@gmail.com>2016-12-21 08:06:31 +0200
commitc72373114c53c6eb8fe68a846e20e330977a9677 (patch)
tree4328732aa3f0b1774035b83b731cbc0f3209cba9 /client
parent95d016c08569f74a2c76eac40c4f5656bb773951 (diff)
downloadvaadin-framework-c72373114c53c6eb8fe68a846e20e330977a9677.tar.gz
vaadin-framework-c72373114c53c6eb8fe68a846e20e330977a9677.zip
Set focus when click on RadioButton via JS. (#8062)
Sending click even in JS to a RadioButton in RadioButtonGroup doesn't trigger focus event for RadioButtonGroup in IE11. Fix it. Same fix for CheckBoxGroup.
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCheckBoxGroup.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java2
2 files changed, 7 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VCheckBoxGroup.java b/client/src/main/java/com/vaadin/client/ui/VCheckBoxGroup.java
index d6b8c3ade9..ee1d83ee2c 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCheckBoxGroup.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCheckBoxGroup.java
@@ -29,6 +29,7 @@ import com.google.gwt.user.client.ui.FocusWidget;
import com.google.gwt.user.client.ui.HasEnabled;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ApplicationConnection;
+import com.vaadin.client.BrowserInfo;
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.widgets.FocusableFlowPanelComposite;
import com.vaadin.shared.Registration;
@@ -134,7 +135,11 @@ public class VCheckBoxGroup extends FocusableFlowPanelComposite
// checkbox is disabled
return;
}
-
+ if (BrowserInfo.get().isWebkit() || BrowserInfo.get().isIE11()) {
+ // Webkit does not focus non-text input elements on click
+ // (#11854)
+ source.setFocus(true);
+ }
Boolean selected = source.getValue();
JsonObject item = optionsToItems.get(source);
diff --git a/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java b/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java
index fe5afea620..7cfaf7572e 100644
--- a/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java
+++ b/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java
@@ -152,7 +152,7 @@ public class VRadioButtonGroup extends FocusableFlowPanelComposite
// radiobutton is disabled
return;
}
- if (BrowserInfo.get().isWebkit()) {
+ if (BrowserInfo.get().isWebkit() || BrowserInfo.get().isIE11()) {
// Webkit does not focus non-text input elements on click
// (#11854)
source.setFocus(true);