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

Disable auto-tabbing #495

Open
symbiosdotwiki opened this issue Sep 18, 2015 · 5 comments
Open

Disable auto-tabbing #495

symbiosdotwiki opened this issue Sep 18, 2015 · 5 comments

Comments

@symbiosdotwiki
Copy link

In the multi-select widget how do you prevent auto-tabbing after entering one selection?

@jpic
Copy link
Member

jpic commented Sep 19, 2015 via email

@blueyed
Copy link
Member

blueyed commented Sep 19, 2015

@nwaxiomatic

auto-tabbing

Do you mean that the first element gets automatically selected?

I agree with @jpic: please be more verbose with reports/questions.

@symbiosdotwiki
Copy link
Author

auto tabbing is common phrase in javascript to denote the auto tabbing (ie the same result as pressing the tab key) which results in the automatic change of focus from one field to another.

That said, the multiselect widget auto-tabs (ie automatically refocuses) on the new field once a selection has been made. After I press enter to select a choice, it pulls up a new field and automatically pulls the dropdown menu open for this field.

Specifically this action occurs id the min_num parameter in the Autocomplete is set to zero.

Is there a default parameter to prevent this action, and if not how would go about preventing this?

@jpic
Copy link
Member

jpic commented Sep 21, 2015

Doesn't this fixes it for you ? yourlabs/jquery-autocomplete-light#9

@symbiosdotwiki
Copy link
Author

I found the culprit code at line 118 in widget.js within the "yourlabs.Widget.prototype.selectChoice" section

if (this.input.is(':visible')) {
        this.input.focus();
    }

Is there a way to prevent this focus when

attrs={
        'data-autocomplete-minimum-characters': 0,
    }

is set for the autocomplete?

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

3 participants