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".
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


