Skip to content

jQuery#find in 4.x will not work with the ShadyDOM polyfill in forced mode #5032

Open
@blackjackyau

Description

@blackjackyau

Description

https://codepen.io/blackjackyau/pen/popVgXy

On a shadydom polyfilled environment, the find() function from Jquery 3.5.0 version and above is not working correctly when there's more than one selector specified.
This behaviour can be seen from the codepen link provided where no result is return from $("#table").find('tr td')[0] but is return from $("#table").find('tr').find('td')[0]

Workaround

  • swap the load order of jquery and webcomponents ( to load shadydom polyfill first before jquery )

Link to test case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions