TheAlgorithms / website

The Algorithms website providing GitHub's largest open-source algorithm library.
https://the-algorithms.com
MIT License
819 stars 173 forks source link

Bug: The search bar does not work properly #252

Open BamaCharanChhandogi opened 1 year ago

BamaCharanChhandogi commented 1 year ago

Description of the bug

Description of the bug When I click the back button search result shows repeated in below.

How to reproduce Write anything on the search bar and click the back button, You will notice.

Add screenshots of the bug (if applicable)

https://github.com/TheAlgorithms/website/assets/69814563/d2729fd2-89ac-42eb-a1be-e0dd964462f5

Additional information/context

No response

anshvert commented 11 months ago

Ok Understood the issue. Could you explain how the expected solution should work?

Panquesito7 commented 7 months ago

Ok Understood the issue. Could you explain how the expected solution should work?

  • You want to redirect to the home page?
  • stay at search page and clear search bar input?
  • or anything else ?

Great catch, thank you! 🚀 I believe it should go back to the last page before the search page was accessed.

ahmed0saber commented 4 months ago

I think the issue is not clear enough, as many people have misunderstood it. The issue should be named "Prevent search parameters from being pushed to browsing history", with description explaining that pressing the browser back button should take us to the previous page, instead of the previous search result..