diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2018-03-23 15:09:10 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-03-23 15:09:10 +0200 |
commit | 0f052d4fcb5eabccfaae5a2e486c38cb5eabc08d (patch) | |
tree | c085dc3a9d5dca10804115567a151f599fc79003 /client/src | |
parent | c78069eb3ece1b450c8fe911bf3c3a4dafef02c3 (diff) | |
download | vaadin-framework-0f052d4fcb5eabccfaae5a2e486c38cb5eabc08d.tar.gz vaadin-framework-0f052d4fcb5eabccfaae5a2e486c38cb5eabc08d.zip |
Fix VComboBox internal state cleanup (#10693)
Fixes vaadin/testbench#1009
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VComboBox.java | 5 | ||||
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 5 |
2 files changed, 8 insertions, 2 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 863b56decc..d67615d4b2 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -257,12 +257,12 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, return $entry(function(e) { var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX; var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY; - + // IE8 has only delta y if (isNaN(deltaY)) { deltaY = -0.5*e.wheelDelta; } - + @com.vaadin.client.ui.VComboBox.JsniUtil::moveScrollFromEvent(*)(widget, deltaX, deltaY, e, e.deltaMode); }); }-*/; @@ -1561,6 +1561,7 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, */ private void cancelPendingPostFiltering() { pendingUserInput = null; + waitingForFilteringResponse = false; } /** diff --git a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java index 21b4c0b02f..8178640900 100644 --- a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -130,6 +130,11 @@ public class ComboBoxConnector extends AbstractListingConnector getWidget().selectedOptionKey = null; getWidget().currentSuggestion = null; } + if (isNewItemStillPending() + && pendingNewItemValue == getState().selectedItemCaption) { + // no automated selection handling required + clearNewItemHandling(); + } getDataReceivedHandler().updateSelectionFromServer( getState().selectedItemKey, getState().selectedItemCaption, getState().selectedItemIcon); |