Page MenuHomePhabricator

Collapsible elements are invisible to browser search
Open, Needs TriagePublicBUG REPORT

Description

Steps to reproduce

  1. Open https://www.mediawiki.org/w/index.php?title=Manual:Collapsible_elements&oldid=5581603
  2. Using the browser search (+F, +F etc.), search for is hidden.

Actual result

  1. Two results are found, in the two code examples.

Expected result

  1. Four results are found: two in the code examples, and two in the rendered examples.

Other information

At least in Chrome and many Chromium-based browsers, MobileFrontend fixed this in 1abe4bd7dbd3b4001979a9bdb518f8d4d287a485 (T216789). The same fix should work here as well.

Event Timeline

Change 967556 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/core@master] makeCollapsible: Expand when text is matched with browser find feature

https://gerrit.wikimedia.org/r/967556

Unfortunately this won't work with how we current collapse tables, as content-visibility can't be used to hide table structure, but it will work in all other cases.

Unfortunately this won't work with how we current collapse tables, as content-visibility can't be used to hide table structure, but it will work in all other cases.

I realised we can force this to work with table cells, by turning them into not-table cells when hidden (using display:block)!