From d44fa8b3494fb3780d2c3f8ab73a8e202e73ccfd Mon Sep 17 00:00:00 2001 From: Aleksi Hietanen Date: Tue, 29 Nov 2016 15:46:06 +0200 Subject: Make clicking outside a ComboBox add a pending new item (#18366) It should not matter how you move from a field to the next. Tabbing to the next field already previously caused the new item handler to be invoked. This fixes the case when you click in the next field to work the same way. Change-Id: I3978d87cde8f05dce92edda2a4a116f4a15e0749 --- .../src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compatibility-client') diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java index 0b7724f3d0..29e4aa006f 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java @@ -2381,6 +2381,9 @@ public class VFilterSelect extends Composite focused = false; if (!readonly) { + if (textInputEnabled && allowNewItem) { + suggestionPopup.menu.doSelectedItemAction(); + } if (selectedOptionKey == null) { if (explicitSelectedCaption != null) { setPromptingOff(explicitSelectedCaption); -- cgit v1.2.3