Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature: Add a configurable keypress delay before initiating search #731
Labels
Comments
|
Great idea. Thanks for the suggestion! |
basetdd2416
pushed a commit
to basetdd2416/fwd-max-2-api-docs-spec
that referenced
this issue
Sep 27, 2019
Merge plancode only Approved-by: Apisit Onakekasit <blue@appsynth.net> Approved-by: Sittichok Chartpongsree <richie@appsynth.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Take a look at http://docs.backand.com
Navigate partway down the page, then try to type out "user" - you will see a delay between pressing 'u' and then completing the word, as the search executes on every keyup event.
We'd like to see a configurable timeout for this functionality - some sort of delay after a keypress, to ensure that the user has actually finished typing prior to the search. I did some hacking on this using the suggestions at http://stackoverflow.com/questions/1909441/how-to-delay-the-keyup-handler-until-the-user-stops-typing, but ran into a wall getting it to preserve the event.
In an ideal world, I'd like to see an extra option in index.html.md - search_timeout - which sets the search keypress timeout in milliseconds. Using this, the search wouldn't initiate until after the user has finished typing, or at least paused long enough where the search delay won't be a burden. I'd suggest a default pause of 300 milliseconds.
In my mind this is both a bug fix and a new feature, but I classified it as a feature.