Checklist
What happened?
Discord user "h" reported this problem via this project:
https://pyscript.com/@serialcomma/steep-art-copy/latest?files=main.py
In an ElementCollection, which is what items is here:
items = web.page.find("li")
You get a collection of li elements.
But you may not get the matching li element if you do this:
The bug is that the id is checked in the children of those contained elements, not the id of the (li) elements themselves, in this case. If an li has the id of #an-id then it is missed since only its children are used to match the query.
What browsers are you seeing the problem on? (if applicable)
No response
Console info
Additional Context
No response
Checklist
What happened?
Discord user "h" reported this problem via this project:
https://pyscript.com/@serialcomma/steep-art-copy/latest?files=main.py
In an
ElementCollection, which is whatitemsis here:You get a collection of
lielements.But you may not get the matching
lielement if you do this:The bug is that the
idis checked in the children of those contained elements, not theidof the (li) elements themselves, in this case. If anlihas theidof#an-idthen it is missed since only its children are used to match the query.What browsers are you seeing the problem on? (if applicable)
No response
Console info
Additional Context
No response