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

Set focus to selection synchronously when closing #5552

Closed
wants to merge 1 commit into from

Conversation

blikblum
Copy link
Contributor

@blikblum blikblum commented Jul 1, 2019

This pull request includes a

  • Bug fix
  • New feature
  • Translation

The following changes were made

  • Set focus to selection synchronously in close event (remove setTimeout call)
  • Call native focus method instead of jquery one because the later fails with jquery v1

If this is related to an existing ticket, include a link to it as well.

Fixes #5532

@blikblum
Copy link
Contributor Author

blikblum commented Jul 7, 2019

Probably fixes #5185 also

kevin-brown added a commit that referenced this pull request Jul 21, 2019
This behaviour, where the focus was happening on a small asynchronous
delay, was added in commit 933189b late last year in a commit with
no supporting tickets or commit message explaining what the change
was trying to accomplish. This commit has effectly been reverted within
this commit, since it caused a regression in how focus was being
assigned that made it inconsistent with a standard `<select>`.

A test was added for this which ensures that we won't see that
regression again.

Fixes #5532
Fixes #5185
Closes #5552
kevin-brown added a commit that referenced this pull request Jul 21, 2019
This behaviour, where the focus was happening on a small asynchronous
delay, was added in commit 933189b late last year in a commit with
no supporting tickets or commit message explaining what the change
was trying to accomplish. This commit has effectly been reverted within
this commit, since it caused a regression in how focus was being
assigned that made it inconsistent with a standard `<select>`.

A test was added for this which ensures that we won't see that
regression again.

Fixes #5532
Fixes #5185
Closes #5552
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

Successfully merging this pull request may close these issues.

4.0.5 -> 4.0.7 select2.close event regresssion
1 participant