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

Hitting Tab won't jump to next field (regression in 0.12.3) #1164

Closed
sturchyn opened this issue Sep 30, 2016 · 11 comments
Closed

Hitting Tab won't jump to next field (regression in 0.12.3) #1164

sturchyn opened this issue Sep 30, 2016 · 11 comments

Comments

@sturchyn
Copy link

sturchyn commented Sep 30, 2016

Hi,

the behaviour on KEY_TAB is broken in the version 0.12.3.

Here examples to reproduce it:

selectize 0.12.2 (works)
https://jsfiddle.net/sturchyn/b961qfjk/

selectize 0.12.3 (doesn't work)
https://jsfiddle.net/sturchyn/vyggj6oz/

(Given a Selectize with option selectOnTab:true)

Steps to reproduce:

  1. Set focus on the select box.
  2. Select the option 'B'.
  3. Press the key 'TAB'.

Expected result:

  • The option 'B' is selected.
  • The select box is closed.
  • The cursor jumps to the next input field.

Actual result (with 0.12.3):

  • The option 'B' is selected.
  • The select is open.
  • The focus is on the select box.

Many thanks for Selectize :-)

Best regards
Stanislav

@joallard
Copy link
Member

joallard commented Oct 1, 2016

Indeed, great report, thanks!

@joallard joallard added the bug label Oct 1, 2016
@joallard joallard added this to the 0.12.5 milestone Oct 1, 2016
@joallard joallard changed the title no jumping to the next field if selectOnTab:true Hitting Tab won't jump to next field (regression in 0.12.3) Oct 1, 2016
@hupf
Copy link
Contributor

hupf commented Dec 5, 2016

This regression has been introduced by the following change in #1127:
d7015c9#diff-6cee306935e9c39b0f577d4ccb04fadeR1744

If you comment this line, the tab behavior works as expected.

Any idea how we can fix the iOS issue without breaking the default tab behavior?

hupf added a commit to hupf/selectize.js that referenced this issue Dec 5, 2016
@joallard
Copy link
Member

joallard commented Dec 5, 2016

@hupf If you get around to a PR, do mention me, I've checked out of notifications but this seems like a priority.

@hupf
Copy link
Contributor

hupf commented Dec 6, 2016

Here's my pull request: #1215

joallard added a commit that referenced this issue Dec 6, 2016
Fix tab key regression introduced by touch handling #1164
@joallard
Copy link
Member

joallard commented Dec 6, 2016

Merged

@joallard joallard closed this as completed Dec 6, 2016
@copperx
Copy link

copperx commented Jun 3, 2017

The issue is still present in 0.12.4 when using the following options

            create: false, 
            preload: true,
            selectOnTab: true,
            sortField: 'name',

and having onChange, render, and load callbacks.

I've gone back to 0.12.2 to avoid the issue.

@joallard joallard reopened this Jun 4, 2017
@Elias-Serneels
Copy link

Just commenting to confirm this issue in 0.12.4 on firefox and IE using following options:

closeAfterSelect: true,
maxItems: 1,
persist: false, // setting this to true has same problem.
create: someFunction

reverting to 0.12.2 solved this particular issue but one issue on firefox remained: tabbing from a selectize field to a regular input field kept focusing back to the selectize field.

This last issue was solved by incrementally setting the tabindex of each input field every time a form is shown:
$("#" + wrapperId + " :input:not(:hidden)").each(function (i) {$(this).attr('tabindex', i + 1); });

topaxi added a commit to topaxi/selectize.js that referenced this issue Dec 18, 2017
@claudiobmgrtnr
Copy link

Hi @joallard is there any chance that this issue will be resolved in the near future? Would be awesome.

Cheers

@Calytic
Copy link

Calytic commented Aug 14, 2018

Still can't tab out of a selectize input.

@AndyThayer
Copy link

Same issue in Firefox 61.0.1 (64-bit). Can't tab past the selectize.

michael-maltsev pushed a commit to michael-maltsev/selectize.js that referenced this issue Aug 28, 2018
@h0jeZvgoxFepBQ2C
Copy link

Please release a new version with this fix included!

anandphulwani pushed a commit to anandphulwani/selectize.js that referenced this issue Jan 17, 2021
Rectified selectize#1164 issue considered previously fixed, done with the pull
selectize#1353 and
pushed commit
michael-maltsev@f6e9faa
risadams pushed a commit that referenced this issue Jan 17, 2021
Rectified #1164 issue considered previously fixed, done with the pull
#1353 and
pushed commit
michael-maltsev@f6e9faa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants