Steps to reproduce
- Go to https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page
- Tap the search button
- Tap the close button
- Tap the search button (you'll probably see the screen kind of jank out here like a vertical scroll bar flipped on for a moment)
- Tap the close button
Expected results
- Search overlay is fullscreen
Actual results
- Search overlay is sadly not fullscreen 😭 It usually goes full screen when search results are shown:
- Example from http://reading-web-staging.wmflabs.org/wiki/Main_Page with non-fullscreen results:
Environments observed
Browser Version:
- Chromium v64.0.3282.167 (Official Build) Built on Ubuntu , running on Ubuntu 17.10 (64-bit)
OS Version:
- Ubuntu v17.10
Device Model:
- Desktop
Device Language:
- English (beta cluster)
Developer notes
- All overlays are full screen by default - there's even a Overlay.prototype.fullScreen flag. An "overlay-enabled" class is added to the html tag when an overlay is shown and removed when it is hidden. Overlay::hide and Overlay::show manage this.
In the case of the SearchOverlay when the search button is clicked a second time a show AND hide action are called.
The hide action is incorrectly called due to SearchOverlay::_hideOnRoute. The method knows it's doing something naughty - because it has a FIXME. (FIXME: Remove when search registers route with overlay manager)
It looks like @Jdrewniak is working to remove this (https://gerrit.wikimedia.org/r/#/c/422118/5/resources/mobile.search/SearchOverlay.js) in which case his changes in T189212 will fix this.