diff options
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/Panel.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Panel.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Panel.java b/server/src/main/java/com/vaadin/ui/Panel.java index c179df9be2..55ca2c643e 100644 --- a/server/src/main/java/com/vaadin/ui/Panel.java +++ b/server/src/main/java/com/vaadin/ui/Panel.java @@ -273,10 +273,8 @@ public class Panel extends AbstractSingleComponentContainer * @return a registration object for removing the listener */ public Registration addClickListener(ClickListener listener) { - addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener, - ClickListener.clickMethod); - return () -> removeListener(EventId.CLICK_EVENT_IDENTIFIER, - ClickEvent.class, listener); + return addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, + listener, ClickListener.clickMethod); } /** |