From 9c9991d8877652d2f122ee78ce4173972e1bc11d Mon Sep 17 00:00:00 2001 From: Tarek Oraby <42799254+tarekoraby@users.noreply.github.com> Date: Mon, 25 May 2020 12:21:11 +0300 Subject: Fix ComboBox in read-only mode allowing value change by user (#12022) * Fix ComboBox in read-only mode allowing value change by user Fixes #12021 * Fix popup hiding condition Co-authored-by: Tatu Lund --- client/src/main/java/com/vaadin/client/ui/VComboBox.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client/src') diff --git a/client/src/main/java/com/vaadin/client/ui/VComboBox.java b/client/src/main/java/com/vaadin/client/ui/VComboBox.java index 08c57f888a..6ff2f31a9a 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -2028,6 +2028,9 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, /** For internal use only. May be removed or replaced in the future. */ public void updateReadOnly() { + if (readonly) { + suggestionPopup.hide(); + } debug("VComboBox: updateReadOnly()"); tb.setReadOnly(readonly || !textInputEnabled); } -- cgit v1.2.3