Page MenuHomePhabricator

Unexpected results when modifying a suggested search result (typing a partial search string, keyboard-scrolling down to a suggested result, and modifying it before searching)
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to en.wikipedia.org, and in the search bar, type in "Module:Loc". There are a lot of suggested results, like "Module:Location map/data/USA", "Module:Location map/data/France", "Module:Location map/data/Russia", etc.
  • Use your keyboard's down arrow key to scroll down to one of the suggested results, e.g. "Module:Location map/data/France". The content of the search bar is now "Module:Location map/data/France".
  • Backspace or delete "France" and type in the subpage you actually want to go to, e.g. "Japan Tokyo". The content of the search bar is now "Module:Location map/data/Japan Tokyo".
  • Hit "enter" on your keyboard.

What happens?:
You are, most of the time, taken to https://en.wikipedia.org/w/index.php?search=&title=Special%3ASearch. Occasionally (more frequently in the past), you are taken to "Module:Location map/data/France".

What should have happened instead?:
You should have been taken to https://en.wikipedia.org/wiki/Module:Location_map/data/Japan_Tokyo, since the content of the search bar (the little box you typed your search into) was, at the time you hit enter, "Module:Location map/data/Japan Tokyo".

Other information (browser name/version, screenshots, etc.):

  • I can reproduce this in Firefox, Chrome, and Edge, logged in or out, on two different computers.
  • This bug occurs regardless of whether you change the suggested-result-text (in this case, "Module:Location map/data/France") to text which matches another suggested result (e.g. ".../Russia"), text which does not match any of the suggested results which are being displayed on your screen, but which is a valid page (like ".../Japan Tokyo"), or text which is not a valid page (e.g. ".../Foobarlandiaville"). The bug does not occur if you change the suggested-result-text (in this case, "Module:Location map/data/France") to itself, i.e. backspace to remove the "e" at the end of "France" but then retype it, in which case you are taken to https://en.wikipedia.org/wiki/Module:Location_map/data/France as expected.
  • I have used Wikipedia examples, but the place where I personally encounter this bug is en.Wiktionary.org, where I type "Module:lang" into the search bar in order to get the autocomplete-y suggested results feature to bring up suggestions like "Module:languages/data/3/g", "Module:languages/data/3/a", etc, so that I can just scroll down to one of those and then backspace that last letter and type in the letter of the page I actually want to go to, e.g. "Module:languages/data/3/q", without having to type that entire long string. Originally, doing this worked as expected (I was taken to https://en.wiktionary.org/wiki/Module:languages/data/3/q). Sometime within the last few months, I started to be taken to the page for the search result I had scrolled down to (e.g. https://en.wiktionary.org/wiki/Module:languages/data/3/**a**) instead, despite the fact that I had revised the search (what was typed into the search box). More recently, doing this has started dumping me onto https://en.wiktionary.org/w/index.php?search=&title=Special%3ASearch.
  • A comment on T400291, "Interesting note: if you click on a suggestion, it still submits the title of the suggestion as if you had typed it and hit return", reminded me to report this (because it initially struck me as a similar behavior, although on further consideration it's maybe unrelated).

Event Timeline

CirrusSearch is the piece of software to tag for search backend issues on Wikimedia wikis; MediaWiki-Search for frontend :)

@-sche thanks for the report! If you temporarily switch the selected skin in your preferences, does this behaviour occur on skins other than Vector (2022)? If not, I wonder if this might be the same issue as T333608: [Timebox] Vector 2022 search navigates to the wrong result if you type after selecting an item using arrow keys.

@A_smart_kitten: Aha, no, the bug does not occur if I switch to Vector Legacy or Monobook. This explains why I only started encountering it within the last few months, because that's around when I switched to Vector 2022. Apologies for the redundant bug report, then.

Thanks for testing, and no worries! Better to file a bug report about something that's already been reported, than to not file one about something that isn't yet known about ^^