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

Collapse.prototype.show find selector #15131

Closed
FarSeeing opened this issue Nov 14, 2014 · 3 comments
Closed

Collapse.prototype.show find selector #15131

FarSeeing opened this issue Nov 14, 2014 · 3 comments
Labels
Milestone

Comments

@FarSeeing
Copy link

Right now Collapse.prototype.show uses the following jQuery selector:

this.$parent.find('> .panel').children('.in, .collapsing')

https://github.com/twbs/bootstrap/blob/master/js/collapse.js#L49

The .find('> .panel') will always be processed by Sizzle and not by querySelectorAll because of the child selector (>). Would be nice to replace with .children('.panel').children('.in, .collapsing').

@juthilo juthilo added the js label Nov 14, 2014
@hnrch02 hnrch02 added this to the v3.3.2 milestone Nov 14, 2014
@hnrch02
Copy link
Collaborator

hnrch02 commented Nov 14, 2014

Good call, thanks!

@FarSeeing
Copy link
Author

Thanks.
Seems like Tab.prototype.activate has same selector issue. Not sure about complex selector ('> .dropdown-menu > .active') though.

@hnrch02
Copy link
Collaborator

hnrch02 commented Nov 14, 2014

I'll leave that as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants