Opened 5 years ago
Closed 4 years ago
#18862 closed defect (fixed)
FilteringSelect does not clear value in IE in all cases
Reported by: | Michael Schall | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit - Form | Version: | 1.11.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
IE (at least v11, may be earlier) has an "X" in <input type=text /> to clear the value of a text box. The FilteringSelect? widget (which uses <input type=text /> for autocomplete) does not clear the value of the widget if the keyboard is used to select a value and the "X" is used to clear it. It works fine if the item is selected from the drop down using the mouse.
Clear on textbox is an IE only feature, so need to test with IE...
Here is reproduction: http://plnkr.co/edit/BqyajhmX3UsE94BRolce?p=preview
Good case:
- click the drop down arrow
- select Glovertown
- click off the dropdown widget
- click "Get Value" button
- current value will be shown as 2
- click in text box ("X" appears on right)
- click "x" (text is removed, dropdown is shown)
- click "Get Value" button
- current value will be shown as empty
Bad case:
- click in text box
- type Gl <tab>
- click "Get Value" button
- current value will be shown as 2
- click in text box ("X" appears on right)
- click "x" (text is removed, dropdown is NOT shown)
- click "Get Value" button
- current value will be shown as 2 <-- incorrect!
A workaround is to hide the "X" for FilteringSelect? inputs:
.dijitComboBox .dijitInputInner::-ms-clear { display: none; width: 0px; height: 0px; }
However we would like to keep the "X" if possible. We are using 1.10.4 in production which also has this issue.
Change History (4)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
This was committed prematurely (before PR and a review)... we will have a PR for review shortly.
comment:3 Changed 4 years ago by
Submitted PR 118 (https://github.com/dojo/dijit/pull/118) to implement this fix. Also added a test to verify it.
Committed fix (https://github.com/dojo/dijit/commit/6d5fa1c16fe9a4fb61eab191e8c7b8df8d068bcd) that adds detection for when input element is cleared and sets 'item' to null in dijit/form/_AutoCompleterMixin