Skip to content

Changes to search query may be overridden by GlobalNavbar query update logic (racy)

Created by: lguychard

The search suggestions regression test is failing, with the search suggestions widget failing to show at this step.

Running the tests locally, I noticed that while the suggestions widget was initially shown, shortly after the jwtmi keyboard input was erased, and the suggestions widget was hidden.

I tracked this down to the query update logic in <GlobalNavbar/>, which was added to fix another critical issue in #13954. Any query changes from user input occurring between a location change and the execution of this useEffect block would be erased.