Open captainbrosset opened 5 months ago
Thanks for filing @imba-tjd. I know that there's been some work on search lately, so this might be related.
Just to make sure I understand: you're saying that the "xxx/200" counter is missing, but apart from this, search works, right?
I mean the total number isn't correct. For example xxx/123
even though there are actually 200.
Thanks for clarifying, I was able to reproduce the issue.
If others want to test this, you can use the following URL (just copy the whole string, paste it into the address bar, and press Enter):
data:text/json,["aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa","aaa"]
Now, there are 2 ways to search:
Click somewhere inside the rendered JSON text, and then press Ctrl+F. This opens up a new search UI which does not include a total matches counter. See below:
Click outside of the rendered page, for example click inside the address bar, and then press Ctrl+F. This opens up the usual browser search UI. This one does include a total matches counter, and ithat counter is incorrect. See below, there are 288 aaa
in the JSON text, but the search field only counts a total of 119 instances:
My understanding is that, for performance reasons, the JSON viewer only renders what's visible in the viewport, and then renders more content as you scroll. This is why the usual browser search field can't find the total number of instances. These instances simply don't exist in the DOM yet.
The new search UI (first screenshot above) is, I think, supposed to replace the browser search field in the JSON viewer. So I think this issue is really about two things:
It shouldn't be possible to use the usual browser search field in the JSON viewer, because it doesn't work. The new search UI should show the total number of matches and current index.
Or, the other way around: the usual browser search field should just work with the JSON viewer, and the new search UI should be removed.
Originally posted by @imba-tjd in https://github.com/MicrosoftEdge/DevTools/issues/87#issuecomment-1925750811
AB#47800890