diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2019-10-31 13:48:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-31 13:48:17 +0200 |
commit | 1b55d3668bc067a266c6a1b128b978c43418b812 (patch) | |
tree | d84af71ae15a58f15f9719ef5fb050ceb8182f25 /client | |
parent | 7e44bb38e1c4b0166e78697da74f33517cd1e4f3 (diff) | |
download | vaadin-framework-1b55d3668bc067a266c6a1b128b978c43418b812.tar.gz vaadin-framework-1b55d3668bc067a266c6a1b128b978c43418b812.zip |
Fix a timing issue in ComboBox filtering via paste using mouse. (#11780)
The filtering needs to be delayed, otherwise it's performed before the
new filter text is available and the old filter text is used instead.
Fixes #11779
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VComboBox.java | 4 |
1 files changed, 3 insertions, 1 deletions
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 81453bfade..3c2f599300 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -28,6 +28,7 @@ import java.util.logging.Logger; import com.google.gwt.animation.client.AnimationScheduler; import com.google.gwt.aria.client.Roles; import com.google.gwt.core.client.JavaScriptObject; +import com.google.gwt.core.client.Scheduler; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.NativeEvent; @@ -1850,7 +1851,8 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, if (event.getTypeInt() == Event.ONPASTE) { if (textInputEnabled && connector.isEnabled() && !connector.isReadOnly()) { - filterOptions(currentPage); + Scheduler.get() + .scheduleDeferred(() -> filterOptions(currentPage)); } } } |