imankulov / asuggest

JQuery textarea suggestion library
61 stars 19 forks source link

Space bar to quit autocompletion #2

Closed dennispopel closed 14 years ago

dennispopel commented 14 years ago

This is a more sort of a feature request. Having conducted a very small usability study, we concluded that with this autocompleter, it would be great when pressing Space on the Tab-cycled input, the autosuggested value would not be replaced but rather the autocompletion should finish and the space appended after the suggestion.

imankulov commented 14 years ago

Implemented "stop suggesting" feature

When a user press one of the pre-defined keys (for example, "Enter" or "Space"), asuggest stops auto-completing and then the space or another pre-defined symbol is appended to the text.

New asuggest options:

In order to prevent such behaviour it's enough to pass an empty array for a "stopSuggestionKeys" argument.

There is a set of constants in $.asuggestKeys variable, which simplifies the definition of stopSuggestionKeys array.

Closed by 62c5ca3fb45c250c009c7bd637388224e80bf36b

dennispopel commented 14 years ago

Incredible, thanks!