You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a race condition which I think has been addressed. The issue is that the search box is not opened quick enough for the input box to be selected.
@kevin-brown you're probably right about this being a race condition. But it is definitely not fixed. The commits I mentioned attempt to fix issues about this opening it. But in reality, the IE issues are still there. In reality, the Select2 component has focus. But unlike other autocomplete components, the field you type into is not visible.
Select2 shows a "container" (the div- element). When you start typing, then you show a stand-in text field. And since it (the "search" field) is not visible, the code attempts to record the first key pressed.
You will find the code in "focusSearch" around line 1310 of select2.js.
The problems occur for me in IE when I use ajax responses to populate the results. And typing at normal speed really makes that first letter to occur later in the search field.
I was thinking, could we overcome this problem by always having the "search" field visible? If we change the design so the search field is not hidden/shown, then this problem would never occur, right?
However, this would also change the entire state of the "focus" state of Select2 -- where the container has focus, but the search+result area is not open.
Is this possible, from an interaction part of view?
Try this on the demo example "Loading Remote Data" in IE8:
Given a select2 element has focus (but is not open so the actual search field is not visible)
When I type "sin" in normal fast type,
Then I should see "sin" in the search field"
Actual output differs depending on the speed you type. Sometimes "sin" becomes "in", sometimes "isn", where the actual order is changed
The previous issues #369 and #354 fixes an issues about clicking select 2 box and not opening.
However, that workaround waps an extra setTimeout() around a call to focus and open the search field when opening (the searchFocus() method)
The text was updated successfully, but these errors were encountered: