-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ctrl-click): Enable Ctrl-Click on suggestions (#542)
* feat(ctrl-click): Enable Ctrl-Click on suggestions This updates the underlying autocomplete.js to a version that passes the selection context (click or keyboard) to the `autocomplete:selected` event. With the default `handleSelected, and in the case of a click, it will do nothing (as each suggestion already being a `<a href>`, it will already follow the link), but manually change the location for keyboard navigation. When a custom `handleSelected` is set though, default browser clicks on suggestions are disabled and only `handleSelected` is called. This is to keep backward compatibility with all the live websites that might already use `handleSelected`. * fix(test): Making sure it does not crash when no context is passed
- Loading branch information
1 parent
892f1b0
commit a470c48
Showing
5 changed files
with
44 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters