Closed Bug 1634662 Opened 5 years ago Closed 1 year ago

Search in Inspector doesn't find some elements (rel="icon")

Categories

(DevTools :: Inspector, defect, P2)

75 Branch
defect

Tracking

(firefox137 fixed)

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: gendalph20, Assigned: gzulys)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Inspect any page with a 'link rel="icon"' and any element with a class "icon-whatever" (in this case - some embedded CSS and a span).
Enter search term "icon" (no quotes)
Get completion for ".icon-whatever"

Try searching for rel="icon" and get no completion (fine).
Search doesn't find the <link> element.

Specific page I had issues with is https://privatbank.ua

Actual results:

Any sort of completion overrides whatever search terms user enters on pressing Enter: entering "icon" would complete search term to a CSS class (.icon-whatever), to search for "icon" I have to click somewhere with a mouse, so completion would lose focus and go away.
Moreover, I can't search for rel="icon" - I get no results whatsoever.

Expected results:

User should be allowed to disregard completion using an intuitive hotkey (ideally just Enter and hit Tab to complete, but Ctrl+Enter or Shift+Enter would work too).
In my case, hitting just entering "icon" and hitting Enter should have searched for "icon", and searching for rel="icon" should work.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Inspector
Product: Firefox → DevTools

Autocomplete can be cancelled by pressing the Escape key. Then, it's possible to search using the term typed in the search field.

Searching for "rel" does find the <link> elements. Searching for "rel=" seems to switch the search into a different mode, text search and the <link> elements are no longer found. This is indeed a bug.

Severity: normal → S3
Priority: -- → P3
Summary: Search in Inspector doesn't find some elements and has extremely intrusive completion → Search in Inspector doesn't find some elements

The search logic can be found at https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/devtools/server/actors/utils/walker-search.js#243-299

Note that the inspector search currently allows to search for:

  • text content
  • attribute names
  • attribute values
  • xpath
  • tagname
  • css selector

rel="icon" doesn't match any of the supported search modes.

This now makes way more sense. I couldn't find this info even googling for half an hour.
Thank you.

Maybe this can be added as a Help button of some sort?

Type: defect → enhancement
See Also: → 1940867
Summary: Search in Inspector doesn't find some elements → Search in Inspector doesn't find some elements (rel="icon")
Type: enhancement → defect
Priority: P3 → P2
Duplicate of this bug: 1940867
Assignee: nobody → gintaras.zulys.dev
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9462029 - Attachment is obsolete: true
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c88797937acc Adds searching with attributeName=attributeValue in Inspector. r=nchevobbe,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
Regressions: 1952836
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: