Lucas_Werkmeister_WMDE added a comment.

  In T317682#8249254 <https://phabricator.wikimedia.org/T317682#8249254>, 
@AnneT wrote:
  
  > We could potentially fix this by updating the `onSubmit()` handler in 
CdxTypeaheadSearch to check if there is a currently highlighted item and, if 
so, do the following:
  >
  > - `preventDefault()` on the submit event
  > - run the `onSearchResultClick()` method to emit the proper data for 
instrumentation
  > - navigate to the highlighted item's URL
  > - return
  >
  > We might even be able to bypass all of this via some key modifiers on the 
menu item links in the template, but I haven't looked into that yet.
  >
  > Would this be acceptable from the Web team's standpoint, given that the 
form would no longer be submitted under this circumstance, and a different 
event would be emitted (`search-result-click` instead of `submit`)?
  
  I implemented something along these lines in the above change.

TASK DETAIL
  https://phabricator.wikimedia.org/T317682

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: mpopov, cchen, EBernhardson, ItamarWMDE, dcausse, Gehel, Jdlrobson, 
Catrope, AnneT, jhsoby, Aklapper, Michael, Lucas_Werkmeister_WMDE, phuedx, 
Adamm71, hnijhuis, Jersione, Hellket777, NHillard-WMF, LisafBia6531, 
Astuthiodit_1, STH, 786, Biggs657, Patafisik_WMF, karapayneWMDE, Invadibot, 
MPhamWMF, Selby, Universal_Omega, maantietaja, Juan90264, Alter-paule, 
NavinRizwi, Beast1978, CBogen, Un1tY, Akuckartz, Demian, Hook696, Kent7301, 
joker88john, DannyS712, CucyNoiD, Nandana, Gaboe420, Amorymeltzer, Giuliamocci, 
Cpaulf30, Lahi, Gq86, Af420, Bsandipan, Xover, GoranSMilovanovic, QZanden, 
EBjune, LawExplorer, Lewizho99, JJMC89, Maathavan, Iniquity, _jensen, 
rosalieper, Agabi10, Neuronton, Scott_WUaS, Volker_E, Wikidata-bugs, aude, 
Dinoguy1000, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to