Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.1

Request #14029 Delay-hide menu while typing
Submitted: 2008-05-30 12:09 UTC
From: shangxiao Assigned:
Status: Open Package: HTML_QuickForm_Livesearch (version 0.4.0)
PHP Version: 5.2.6 OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2008-05-30 12:09 UTC] shangxiao (David Sanders)
Description: ------------ Ok, I think I have this one figured out: To help avoid confusion with results in high latency situations and to bring the behaviour of Livesearch more into line with Google's suggest, I reckon it'd be good to have a delayed-hiding of the menu when the user begins to type. The reason is because when the user has typed a few characters and decides it's not enough or completely starts over, the menu results may no longer apply. In a high latency situation this may give the user the impression that the live search isn't working correctly giving incorrect results. To avoid any flickering of the menu, the hiding feature must be delayed by, say, 1/2 a second. I believe this is what Google's suggest does. Try typing a few characters. See what comes up. Choose the longest response in the menu and attempt to type the rest of it. You'll notice that sometimes the menu disappears if it's busy fetching a new one. Occasionally if the response is quick enough it won't hide, but just be replaced by the new set of results. To achieve this you'd simply set a timeout to hide the menu whenever any character is entered. When the response from the server is received then the menu will reappear with the new results. I'd be happy to supply a patch if you think this is a good idea.

Comments