Opened 3 years ago

Closed 3 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:

  1. click the drop down arrow
  2. select Glovertown
  3. click off the dropdown widget
  4. click "Get Value" button
  5. current value will be shown as 2
  6. click in text box ("X" appears on right)
  7. click "x" (text is removed, dropdown is shown)
  8. click "Get Value" button
  9. current value will be shown as empty

Bad case:

  1. click in text box
  2. type Gl <tab>
  3. click "Get Value" button
  4. current value will be shown as 2
  5. click in text box ("X" appears on right)
  6. click "x" (text is removed, dropdown is NOT shown)
  7. click "Get Value" button
  8. 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 3 years ago by Michael J Van Sickle

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

comment:2 Changed 3 years ago by dylan

This was committed prematurely (before PR and a review)... we will have a PR for review shortly.

comment:3 Changed 3 years ago by Michael J Van Sickle

Submitted PR 118 (https://github.com/dojo/dijit/pull/118) to implement this fix. Also added a test to verify it.

comment:4 Changed 3 years ago by Michael Van Sickle <mvansickle1@…>

Resolution: fixed
Status: newclosed

In bf69956/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.