While working with search functionality of the Zappl.com app, today I found an interesting bug where search text does not clear away while search results are loaded without search text context.
Expected behavior
Search text should always clear out after navigating away from search results page back to home page or other part of the application.
Actual behavior
Search text does not clear away if you navigate away from search results page and come back to new/trending or any post listing page. However, you will notice that it is actually not at all searching the keyword this time and results are loaded differently even though search text is still visible at the top.
How to reproduce
- Login to zappl.com application using Google Chrome browser on a Macbook. You will be landed on the Home page of the application.
- Click in the search box on the upper left hand corner and enter search text as "Devil" and hit enter.
- It will load the search results, mine came out to be empty search results or "no post found with #devil". You will notice the search text "#DEVIL" is shown in the center of the screen, just below the main header
- Click on all the four sub-tabs/categories of New, Trending, Hot. Promoted. You will notice that nothing is present as search results in any of them.
- Now, click on the "Z" icon on upper left-hand corner in the header to return to the Home screen again.
- You may see your timeline/feed loaded now or empty feed in case of no data like mine.
- Now, click on down arrow icon next to your Feed bold text text, just left side of Create Zap button. It will open the popover with four link options as New, Trending, Hot. Promoted.
- Click New to navigate to respective feed. You will notice that previously search text "DEVIL" is still shown at the center of the screen. However, this time results are loaded. Check other feeds too like Trending, Hot or Promoted. The search text does not disappear and all options loads some posts in the feed without considering the search word/text. Also, there is no way to clear that search text within the application.
Environment Details
- Browser: Google Chrome (Version 64.0.3282.140 (Official Build) (64-bit))
- Operating system: macOS High Sierra v10.13
Recording Of The Bug
To reproduce the issue, I have created a screen recording as well which can be found at the link: Screen Recording Link
Posted on Utopian.io - Rewarding Open Source Contributors