Page MenuHomePhabricator

TAHS search menu appears in wrong position when first initialized with mobile search overlay
Open, MediumPublic3 Estimated Story Points

Description

Background

  • In TypeaheadSearchWrapper.vue we adjust the bottom position of the search menu on mobile viewports to account for mobile virtual keyboard covering the bottom part of the viewport. This adjustment depends on the viewport, so if you initialize the TAHS on small viewports, and then increase the viewport, it will apply the same adjustment even when not needed.

To reproduce:

  • Open a page in Minerva on small viewports so only the search icon shows
  • click the search icon to open the search overlay
  • exit the search overlay by clickin on the back arrow
  • increase the viewport so that the search bar appears
  • type into the searchbar to see the incorrect search menu styling

Requirements

  • TAHS search menu should always be in the correct position even after resizing viewports

QA

Important to test since it broke before:

Event Timeline

bwang triaged this task as Medium priority.Dec 22 2025, 5:10 PM

Change #1207240 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/core@master] TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience

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

Jdlrobson-WMF set the point value for this task to 3.Jan 8 2026, 11:41 PM

Change #1207240 merged by jenkins-bot:

[mediawiki/core@master] TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience

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

Etonkovidova subscribed.

Testing notes:
(1) How to reproduce the issue - current wmf.11. According to the screen recording in the task description, the following steps should be tested:

  • on a mobile wiki with screen width with about 480 px, click in the search field and type a search terms will display "Search for pages containing [search items", not the suggested articles. For example, "oejoweij" can be used as a search term resulting in the following display:
the task description screen recordingenwiki wmf.11
Screenshot 2026-01-19 at 1.06.32 PM.png (1,592×2,026 px, 536 KB)
Screenshot 2026-01-19 at 1.10.14 PM.png (770×957 px, 75 KB)
Screenshot 2026-01-19 at 12.55.39 PM.png (844×1,570 px, 58 KB)
  • click the back button (the search field back button) and increase the width to >690 px
  • click on the search button and enter the previous search term and observe that the label "Search for pages containing [search items" will be displayed in the search field
the task description screen recordingenwiki wmf.11
Screenshot 2026-01-19 at 1.14.23 PM.png (1,113×1,032 px, 221 KB)
Screenshot 2026-01-19 at 1.16.24 PM.png (1,117×1,017 px, 206 KB)
Screenshot 2026-01-19 at 1.27.18 PM.png (695×930 px, 270 KB)

(2) Tested on enwiki beta - following the steps above, the issue is not present in beta. Below are screen recordings for enwiki wmf.11 - the issue is present and enwiki beta - the issue is fixed:

enwiki wmf.11 - the issue is presentenwiki beta - the issue is fixed
search_label2.gif (724×912 px, 816 KB)
search_label_fixed.gif (724×912 px, 522 KB)

Thanks, @Jdlrobson-WMF I would advocate reverting it as the issue it introduced is more widespread than this one. Let's revert and I'll move this ticket into the new sprint to revisit.

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

[mediawiki/core@master] Revert "TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience"

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

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

[mediawiki/core@wmf/1.46.0-wmf.13] Revert "TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience"

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

Change #1235087 merged by jenkins-bot:

[mediawiki/core@master] Revert "TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience"

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

Change #1235088 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.13] Revert "TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience"

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

Mentioned in SAL (#wikimedia-operations) [2026-01-29T21:18:29Z] <jdrewniak@deploy2002> Started scap sync-world: Backport for [[gerrit:1235102|Revert "Fix sticky header TOC spacing and TOC disappearing on viewport change"]], [[gerrit:1235088|Revert "TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience" (T413378 T415677)]]

Mentioned in SAL (#wikimedia-operations) [2026-01-29T21:20:26Z] <jdrewniak@deploy2002> toyofuku, jdlrobson, jdrewniak: Backport for [[gerrit:1235102|Revert "Fix sticky header TOC spacing and TOC disappearing on viewport change"]], [[gerrit:1235088|Revert "TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience" (T413378 T415677)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be ve

Mentioned in SAL (#wikimedia-operations) [2026-01-29T21:28:26Z] <jdrewniak@deploy2002> Finished scap sync-world: Backport for [[gerrit:1235102|Revert "Fix sticky header TOC spacing and TOC disappearing on viewport change"]], [[gerrit:1235088|Revert "TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience" (T413378 T415677)]] (duration: 09m 56s)

Change #1254996 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/core@master] TypeaheadSearch: ensure fix for mobile keyboard is only applied when the search is using the mobile experience

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