Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add a configurable keypress delay before initiating search #731

Open
evilstickman opened this issue Mar 24, 2017 · 1 comment
Open

Comments

@evilstickman
Copy link
Contributor

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.

@lord
Copy link
Member

lord commented Mar 29, 2017

Great idea. Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants