Search highlight creates multiple blocks for same search term
STR:
- https://bl.ocks.org/ColinEberhardt/raw/6ceb7ca74aabac9c8534d7120d31b382/
- Open js file
- Search for
wasm.
AR: Search highlights wasm and . as separate boxes. Gets worse for wasm.s, creating 3 boxes.
Hey @bomsy do you remember the details here?
Quick ping here @bomsy; do you have more additional information here?
#1629 and #3885 are related. When I was looking into this I also found #6896 which may be caused by the same code.
@jasonLaster if codeMirror is going to be replaced by Monaco then you might want to put this issue on hold or close it.
sorry just seeing this ping! will take a quick look.
/claim
Hello @darkwing ,
I am an Outreachy applicant. I would like to attempt resolving this issue. Let me please claim the issue as I see contributors doing it on the other issues.
Thanks.
Thanks for claiming the issue! :wave:
!!! Please check your email and confirm the invitation
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
@Lathaguna Are you still working on this issue?
/claim
Thanks for claiming the issue! :wave:
!!! Please check your email and confirm the invitation
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
/unclaim
@violasong @mcroud Could we use Firefox's green background highlight in the debugger instead of trying to search matches? It would make life so much easier. Also, what green color is this?
Hi. We have a UX issue for "Unify search highlight colors across DevTools", where we talked about maybe using the green background for search highlights, though we didn't focus on that solution much.
I do think it would be interesting to use sync with what Firefox does for search-in-page. For the record, it's using:
- A magenta background for all matches ("Highlight all" option)
- A green background for the currently selected match
Edit: deleted the next comment to put all my design proposals in the UX bug. Let's try to make a decision there if possible.
@aditya81070 how's it going? are you still interested in this?
/claim I work on this, if its ok.
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
@jasonLaster I think this is a codemirror issue. it looks like when it hits a special character (punctuation space etc) it is creating a new span. The only thing i found that changes the search is
function escapeRegExp(string) {
string = toString(string);
return (string && reHasRegExpChar.test(string))
? string.replace(reRegExpChar, '\\$&')
: string;
}
changes wasm. to wasm\. which I guess is needed for regexp. I will be out of town next couple days but will be back to check this tuesday or wendsday.
This PR is a great start: #7662
Once UX has approved a new look (https://github.com/devtools-html/ux/issues/14), we can move forward 👍
@darkwing Do we still have this issue in Debugger, and do we have a bug on Bugzilla maybe?
We reached a decision in https://github.com/firefox-devtools/ux/issues/14#issuecomment-537047482 and are going to implement it with 3 theme variables (2 already landed, one to be done)
A quick try in Debugger gives me:

The main issue is that we need a style variation to highlight the currently focused result (vs other results in the same document). I tried a few things but wasn't happy with the results.
@fvsch Nice! An amazing contributor, Janelle, fixed this issue of multiple blocks in MC. In theory, implementing this new highlighting appearance should be really easy now.