Page MenuHomePhabricator

Clicking "Search within pages" on mobile search breaks the search input
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Go to https://en.m.wikipedia.org/wiki/Main_Page
  • Click on the search bar, and search for anything
  • Click "Search within pages"
  • In the short moment before the next page loads the search input disappears
  • Go back in history and you can see the same broken state (only in Safari)

What happens?:
The search input is missing from the top of the overlay momentarily (all browsers). In Safari you can see this effect permanently if you go back in history after pressing "Search within pages".

Screen Shot 2022-03-22 at 1.15.01 PM.png (2,690×1,792 px, 400 KB)

What should have happened instead?:
The search overlay should look the same as prior to pressing "Search within pages"

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
Prod, reproduced in Chrome/Safari desktop. The broken state when going back in page history only happens in Safari desktop and iOS.

Developer notes

When the "Search within pages" button is clicked, a form element appears at the end of the body element. This is likely related to the visual change. In Safari, the browser retains this markup when the user goes back in history, so the search input remains broken. This problem doesn't seem to occur in FF and Chrome

Details

Related Changes in Gerrit:

Event Timeline

ovasileva triaged this task as Medium priority.Mar 24 2022, 5:20 PM

Change 773362 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] [search] Fix bugs

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

Change 773362 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] [search] Fix bugs

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

Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Go to https://en.m.wikipedia.org/wiki/Main_Page
Click on the search bar, and search for anything
Click "Search within pages"
In the short moment before the next page loads the search input disappears
Go back in history and you can see the same broken state (only in Safari)

@Jdlrobson, the search input does still appear when you go back in history, however, the task description states:

The search overlay should look the same as prior to pressing "Search within pages"

In this case the text being search for is no longer in the search field, but the search results are. Is this the expected behavior, or should the text still be in the field?

Screen Recording 2022-04-19 at 8.38.02 AM.mov.gif (1,714×1,632 px, 598 KB)

That's fine. Did you test in production or beta cluster? Should this be moved to sign off if the former?

Confirming this is fixed in production on cawiki, resolving.

Screen Shot 2022-04-21 at 12.54.21 PM.png (463×922 px, 146 KB)