This content originally appeared on Geoff Graham and was authored by Geoff Graham
It makes total sense, of course: if content is on the page but isn’t actually showing on the page, then there’s no need to show when searching content. That’s what I assumed it would do, but know for sure after testing in the major browsers.
Search me!
The quick brown fox jumped lazily over the big brown dog. Or something like that.To be clear, once the details
panel is open, search will indeed pick up the text inside. I can see justification for allowing the text to be searched in the closed state as well. It’s one of those things that you sorta have to draw a line in the sand for, and it seems all browsers have drawn the line at excluding hidden text.
In that sense, in-page search treats text inside a details
element the same as text that’s hidden with display: none
.
The post Content inside a `details` element is excluded from in-page search appeared first on Geoff Graham.
This content originally appeared on Geoff Graham and was authored by Geoff Graham
Geoff Graham | Sciencx (2021-07-16T16:42:44+00:00) Content inside a `details` element is excluded from in-page search. Retrieved from https://www.scien.cx/2021/07/16/content-inside-a-details-element-is-excluded-from-in-page-search/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.