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

Selector: Implement uniqueSort, a chainable method version of jQuery.uniqueSort #5166

Closed
mgol opened this issue Nov 24, 2022 · 2 comments · Fixed by #5168
Closed

Selector: Implement uniqueSort, a chainable method version of jQuery.uniqueSort #5166

mgol opened this issue Nov 24, 2022 · 2 comments · Fixed by #5168
Assignees
Labels
Milestone

Comments

@mgol
Copy link
Member

mgol commented Nov 24, 2022

Description

Some APIs, like .prevAll(), return elements in the reversed order, causing confusing behavior when used with wrapping methods (see gh-5149 for more info). To provide an easy workaround, we need to implement a chainable uniqueSort method on jQuery objects, an equivalent of jQuery.uniqueSort.

Link to test case

See gh-5149 for more details

@mgol mgol added the Selector label Nov 24, 2022
@mgol mgol added this to the 3.7.0 milestone Nov 24, 2022
@mgol mgol self-assigned this Nov 24, 2022
mgol added a commit to mgol/jquery that referenced this issue Nov 24, 2022
Some APIs, like `.prevAll()`, return elements in the reversed order, causing
confusing behavior when used with wrapping methods (see jquerygh-5149 for more info)
 To provide an easy workaround, this commit implements a chainable `uniqueSort`
method on jQuery objects, an equivalent of `jQuery.uniqueSort`.

Fixes jquerygh-5166
mgol added a commit to mgol/jquery that referenced this issue Nov 25, 2022
Some APIs, like `.prevAll()`, return elements in the reversed order, causing
confusing behavior when used with wrapping methods (see jquerygh-5149 for more info)
 To provide an easy workaround, this commit implements a chainable `uniqueSort`
method on jQuery objects, an equivalent of `jQuery.uniqueSort`.

Fixes jquerygh-5166
@mgol
Copy link
Member Author

mgol commented Nov 28, 2022

Landed on main in 5266f23. Re-opening until it gets backported to 3.x-stable.

@mgol mgol reopened this Nov 28, 2022
@mgol mgol closed this as completed in 5266f23 Nov 28, 2022
@mgol mgol reopened this Nov 28, 2022
@jquery jquery deleted a comment from laijinchang Dec 5, 2022
mgol added a commit that referenced this issue Dec 14, 2022
Some APIs, like `.prevAll()`, return elements in the reversed order, causing
confusing behavior when used with wrapping methods (see gh-5149 for more info)
 To provide an easy workaround, this commit implements a chainable `uniqueSort`
method on jQuery objects, an equivalent of `jQuery.uniqueSort`.

Fixes gh-5166
Closes gh-5168

(cherry picked from commit 5266f23)
@mgol
Copy link
Member Author

mgol commented Dec 14, 2022

Landed on main in 5266f23 and on 3.x-stable in 0acbe64. Closing as completed.

@mgol mgol closed this as completed Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant