Closed Bug 1548933 Opened 7 months ago Closed 5 months ago

Preview should ignore the search results

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: jlast, Assigned: janelledement)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(2 files)

Search results breakup the yellow highlight token.

STR

  1. search for part of a token
  2. pause
  3. hover on the search result
Attached image search-preview.gif
Priority: -- → P3
Keywords: good-first-bug

@jlast My first impulse is to deal with this problem at the moment addHighlight is called. This function adds the ‘preview-selection’ class to a target element which creates the yellow highlight. The preview object is available in props, one could check the target element's innerHTML against the preview.expression and see if there’s a complete match. If not, recursively compare the previous and next elements. If they’re innerHTML is found in the preview.expression, then add the highlight as well, and if not, stop searching. Would also have to make sure those extra elements had ‘preview-selection’ class removed as well when removeHighlight was called. What are your thoughts on this approach?

Janel, sounds good.

@jlast Ok, thanks. I'd like to claim this bug.

Assignee: nobody → janelledement

This patch addresses bug 1548933. It adds the preview highlight to related tokens (if necessary) as well as the target token. This happens when one token is broken into pieces due to a search query that only covers part of the token.

Pushed by dwalsh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dde6a8f2c41f
Preview should ignore search results. r=davidwalsh
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713
You need to log in before you can comment on or make changes to this bug.