Make inspector "search HTML" feature able to use :has() and such selectors
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(firefox140 fixed)
| Tracking | Status | |
|---|---|---|
| firefox140 | --- | fixed |
People
(Reporter: emilio, Assigned: nchevobbe)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
|
Bug 1871881 - [devtools] Fix Inspector selector search using functional pseudo classes. r=#devtools.
48 bytes,
text/x-phabricator-request
|
Details | Review |
According to bug 418039 comment 88, it doesn't work, and some other combinators are suggested, but also don't work. Not sure if this is intended so filing as a defect for now.
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
So, the search seems to work in some cases for me, but only if I add a space after the closing paren.
Also, the suggestion popup acts super weirdly. For example, on data:text/html,<meta charset=utf8><body><main>hello, if I type :has(body, there's no suggestion shown at any point. But then, as soon as I enter the closing paren, the suggestion does appear, but:
- it is visually truncated
- if I hit enter, the input value is set to
body?!
I'll look into those issues
Updated•2 years ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 2•8 months ago
|
||
In walker.js, for the selector search, we want to avoid calling querySelectorAll if the search
query is a simple tagname, as those are already retrieved in _searchIndex.
The regex that was used to check if we had a complex selector was wrong and would fail to
detect selector with pseudo class (e.g. section:has(button)).
We fix this by checking if the query does look like a tagname (only includes a-z chars and -),
and we add another check to see if the query is a valid selector, using CSS.supports.
Updated•8 months ago
|
| Assignee | ||
Comment 3•8 months ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #1)
So, the search seems to work in some cases for me, but only if I add a space after the closing paren.
Also, the suggestion popup acts super weirdly. For example, on
data:text/html,<meta charset=utf8><body><main>hello, if I type:has(body, there's no suggestion shown at any point. But then, as soon as I enter the closing paren, the suggestion does appear, but:
- it is visually truncated
- if I hit enter, the input value is set to
body?!I'll look into those issues
this looks like Bug 1542277 , I'll investigate there
Comment 5•8 months ago
|
||
| bugherder | ||
Updated•8 months ago
|
Description
•