Skip to content

Conversation

@hendra
Copy link

@hendra hendra commented Aug 8, 2022

This should fix the select2 search auto focusing when using jQuery 3.6.0

allowClear: true
})

if(jQuery().jquery === '3.6.0') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you describe in more detail what changed in jquery 3.6 so that this if is required?
Also, if applying such a change it would be great to do a broader check e.g. if version is >= 3.6

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rafalcymerys,

This pull request includes a fix for the search box not focusing immediately after the select is opened for clients using latest jquery v3.6.0. Please see the video below for the issue.

Spree-Administration-Products.webm

Note : I have changed the jQuery version check with broader check.

@hendra hendra requested a review from rafalcymerys September 23, 2022 04:15
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.

2 participants