Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial typeAhead text is not selected #25

Open
hghubert opened this issue Dec 12, 2012 · 0 comments
Open

Initial typeAhead text is not selected #25

hghubert opened this issue Dec 12, 2012 · 0 comments

Comments

@hghubert
Copy link

I noticed something with the typeAhead that is an issue.

If I set typeAhead = true; then on the initial lookup it does in fact put the text for the item that most closely matches, but it does not select the text so I cannot keep typing.

If there is already an item selected then this works fine.

In debugging it is because the rawValue is not set the first time the typeAhead text is inserted.

A possible solution is in the onTypeAhead function starting at line 982

            if (selStart !== 0 && selStart !== len) {
                inputElDom.value = newValue;

                // need to set the rawValue so the selection works for the first item
                me.rawValue = newValue;
                // end fix

                me.selectText(selStart, newValue.length);
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant