commerce icon indicating copy to clipboard operation
commerce copied to clipboard

The search input issues

Open skupta12 opened this issue 10 months ago • 5 comments

The search input doesn't work on mobile for some reason. It freezes the entire page, making it completely unresponsive. How could I fix that? This bug even exists on the official Next.js Commerce website.

skupta12 avatar Feb 11 '25 11:02 skupta12

Can you share a video please?

leerob avatar Feb 11 '25 15:02 leerob

I go to the mobile menu, enter any text in search input and nothing happens. After that, I try to navigate to a page like All, Shirts, or Stickers, but the requests are not processed. https://github.com/user-attachments/assets/500dddad-f55b-469f-84b0-3fc3e53a8591

skupta12 avatar Feb 11 '25 15:02 skupta12

The same problem exists on the PC side. If you search directly on the homepage, the search will not take effect, and other pages cannot be jumped. If you enter other pages first and then search, you won’t have this problem.

The development mode is correct, but the production mode will have this problem.

F-loat avatar Feb 16 '25 07:02 F-loat

Disabling the prefetch function can solve this problem, not sure if there is a better solution.

<Form action="/search" prefetch={false}>

F-loat avatar Feb 17 '25 09:02 F-loat

I have the exact same issue. Local works fine but production has this issue that @skupta12 showed in the video. Desktop and Mobile has this issue

brandonvilla21 avatar Apr 01 '25 23:04 brandonvilla21