1
0
Fork 0
Commit graph

11 commits

Author SHA1 Message Date
Tim Carry
a470c480dd
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
2018-11-21 15:47:41 +01:00
Mathias Bynens
59a9617512 Omit redundant type="text/javascript" (#543)
https://mathiasbynens.be/notes/html5-levels#type-attributes
2018-11-21 08:49:24 +01:00
Tim Carry
cc0d501012
Add test that normal click is disable with custom handleSelected (#523) 2018-11-06 09:32:34 +01:00
Pixelastic
5e85d7b2ec Add tests (still one test WIP) 2018-11-05 10:22:29 +01:00
Pixelastic
89313450dc Disable links with handleSelected is defined 2018-11-05 10:22:29 +01:00
Pixelastic
6442e032d8 Serve playground 2018-11-05 10:22:29 +01:00
Tim Carry
dd6f2f1611
Better explanation of playground
Co-Authored-By: s-pace <sylvain.pace@algolia.com>
2018-11-02 11:40:54 +01:00
s-pace
b5abdce7e0 test compatibility with multi selectors 2018-11-02 10:05:11 +01:00
s-pace
9e80e72db7 change args.inputSelector as a string 2018-11-02 09:30:05 +01:00
s-pace
b8c55699ef adding multi input feature closes #230 2018-11-01 22:50:00 +01:00
s-pace
8e52c20a02 add a playground to use served assets 2018-11-01 15:21:03 +01:00