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

queryResult is not returning the correct results when there are nested tags #1720

Closed
christiango opened this issue Feb 10, 2025 · 0 comments · Fixed by #1721
Closed

queryResult is not returning the correct results when there are nested tags #1720

christiango opened this issue Feb 10, 2025 · 0 comments · Fixed by #1721
Labels
bug Something isn't working

Comments

@christiango
Copy link
Contributor

Describe the bug
When running query selector all on HTML with nested matches, queryResult is not returning the correct match. queryResultAll returns the correct results at array position 0

To Reproduce
Steps to reproduce the behavior:

Create HTML

<div>
              <blockquote>
                <div class="a">
                  <ul>
                    <li><span>Item 1</span></li>
                    <li><span>Item 2</span></li>
                  </ul>
                </div>
              </blockquote>
            </div>

Run query

querySelector('.a,BLOCKQUOTE');

The returned result is the div with class a instead of the blockquote element

Expected behavior
The blockquote element is returned.

Device:
Repros on all endpoints
Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant