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

Fixes #31 - the Slick.find(element, '~ div') bug #32

Merged
merged 4 commits into from
Mar 26, 2011

Conversation

arian
Copy link
Member

@arian arian commented Mar 9, 2011

Because of this optimization (ddbcb6e#L1R286) the contexts id was temporarily changed to #slickid__, and #slickid__ was added to the expression. However to make ~ and + work the context should move one node upwards.

I added some specs and tested this in Chrome and only some nth selector specs are failing...

@subtleGradient
Copy link
Member

This looks good.
I'd like to get Fabio's input since he's been deeper into the code more recently than I have.
But if all our tests pass then this is likely a good solution.

@fabiomcosta
Copy link
Member

This fixes the problem but we still need a better fix. On selectors with comma, like "node, some" the expression will become "#slickid__ node, some" and it will not work properly. It fixes the current issue, but we still have this bug (that's present on 1.3.1). I think the only way is by parsing the selector before using QSA... but it's not that simple... we need some extra stuff.
What do you guys say?

@subtleGradient subtleGradient merged commit fb40096 into mootools:master Mar 26, 2011
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 participants