close
The Wayback Machine - https://web.archive.org/web/20200618084415/https://github.com/slatedocs/slate/issues/731
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
Labels

Comments

@evilstickman
Copy link
Contributor

@evilstickman evilstickman commented Mar 24, 2017

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 lord commented Mar 29, 2017

Great idea. Thanks for the suggestion!

@lord lord added the enhancement label Mar 29, 2017
eliat123 added a commit to eliat123/slate that referenced this issue May 3, 2017
eliat123 added a commit to eliat123/slate that referenced this issue Jun 19, 2017
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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.