-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove the use of jQuery's is() function for jQuery < 1.6 support. #1555
Conversation
@@ -165,7 +165,8 @@ class Chosen extends AbstractChosen | |||
|
|||
|
|||
test_active_click: (evt) -> | |||
if @container.is($(evt.target).closest('.chosen-container')) | |||
chosenContainer = $(evt.target).closest('.chosen-container') | |||
if chosenContainer.size() > 0 and @container[0] == chosenContainer[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.size()
is deprecated. you sould be using chosenContainer.length
Are you able to create a new release with this fix included, please? Running newer jquery versions in Drupal 7 is really a mess and a Chosen version that works with jQuery 1.4.4 would be great. |
@stof |
You can leave the |
@koenpunt |
Oh, typed too fast, should have been 'leave out' ;) |
Committed that change. It should be good now. |
If you squash it into one commit I think it should be good to go. What about you guys, @harvesthq/chosen-developers? |
it looks good, yes |
@rooby Any chance you can rebase this against master and squash it into one commit? Instructions here. Thanks! |
Adapted from rooby's pull request for issue harvesthq#1555.
This change comes from HitmanInWis's issue at #1471
It removes the use of the jQuery is() function, which is different in jQuery < 1.6 so that a wider range of jQuery versions are support.