-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
None
-
Affects Version/s: 9.0.1, 9.6.2
-
Component/s: Components
-
Security Level: Jimmy
-
Environment:
- OpenJDK 1.8.0_345
- Tomcat 9.0.62
- ZK 9.0.1 and later
-
None
Steps to Reproduce
Given following view model and zul
import java.util.Arrays; import org.zkoss.bind.annotation.Init; import org.zkoss.zul.ListModel; import org.zkoss.zul.SimpleListModel; public class TestViewModel { private ListModel<String> model; public ListModel<String> getModel() { return model; } @Init public void init() { model = new SimpleListModel<String>(Arrays.asList("a1", "a2", "a3", "a4", "a5", "b1", "b2")); } }
<vlayout viewModel="@id('vm') @init('TestViewModel')"> <combobox autocomplete="true" width="18px" model="@load(vm.model)" autodrop="true" /> </vlayout>
- type "a"
- click item "a5"
- type "a"
- click item "a4"
Current Result
First item, "a1", is selected
Expected Result
Item "a4" is selected. Versions up to and including 9.0.0.1 work as expected.
Debug info
1st
1. doKeyUp > _typeahead
valueEnter=a, inp.value=a (no comboitems rendered)
2. setRepos > _typeahead
valueEnter=a, inp.value=a1
2nd
1. doKeyUp > _typeahead
valueEnter=a, inp.value=a1 (comboitem rendered)
2. setRepos > _typeahead
valueEnter=a1, inp.value=a1
3. onblur
onChanging fired
- the 2nd time input, combobox fills 'a1' very fast because comboitem are rendered already.
- when clicking an item, onBlur fires onChanging, then cause removing comboitems immediately, cause not able to click a comboitem.
- only can reproduce this error when the network latency is quite short < 50ms
Workaround
- relates to
-
ZK-5572 combobox onchanging event reporting incorrect value when typing "fast"
-
- Open
-