summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorKnoobie <Knoobie@gmx.de>2017-05-09 08:39:25 +0200
committerHenri Sara <henri.sara@gmail.com>2017-05-09 09:39:25 +0300
commit60db9684a2cf311f05adcf8ca6da00d69799527f (patch)
tree25e7b83b69e853c0e2dfac04726856749a6209c3 /server
parent9e44fb6ef71ed45b7aa0e8b358785dd5719787df (diff)
downloadvaadin-framework-60db9684a2cf311f05adcf8ca6da00d69799527f.tar.gz
vaadin-framework-60db9684a2cf311f05adcf8ca6da00d69799527f.zip
Fix the missing focus and blur implementations (#9269)
Add (FieldEvents.FocusNotifier & FieldEvents.BlurNotifier) in AbstractTextField. The fields TextField, TextArea and PasswordField are the only focusable input fields where this Implementation is missing.
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractTextField.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractTextField.java b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
index 827550fe1d..feb538655f 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
@@ -19,6 +19,7 @@ package com.vaadin.ui;
import java.util.Collection;
import java.util.Objects;
+import com.vaadin.event.FieldEvents;
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
@@ -44,7 +45,7 @@ import elemental.json.Json;
* @since 8.0
*/
public abstract class AbstractTextField extends AbstractField<String>
- implements HasValueChangeMode {
+ implements HasValueChangeMode, FieldEvents.FocusNotifier, FieldEvents.BlurNotifier {
private final class AbstractTextFieldServerRpcImpl
implements AbstractTextFieldServerRpc {
@@ -201,6 +202,7 @@ public abstract class AbstractTextField extends AbstractField<String>
*
* @see Registration
*/
+ @Override
public Registration addFocusListener(FocusListener listener) {
return addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener,
FocusListener.focusMethod);
@@ -216,6 +218,7 @@ public abstract class AbstractTextField extends AbstractField<String>
*
* @see Registration
*/
+ @Override
public Registration addBlurListener(BlurListener listener) {
return addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener,
BlurListener.blurMethod);