Open rdadoune opened 7 years ago
@cvializ could you please take a look?
Thanks for reporting! This is a known issue https://github.com/ampproject/amphtml/issues/10946. For now, users must tab to the the list dropdown, then use the arrow keys.
Will keep this issue open to track adding the keyboard input events to this example when AMP supports them
https://ampbyexample.com/advanced/autosuggest/
It seems as though the intention is for the arrow keys to work for this example but they don't. The
amp-selector
haskeyboard-select-mode="focus"
but I was looking at theamp-selector
source code and it doesn't seem like this is actually possible with the current implementation. I think for it to work, we'd need to be able to wrap the input along with the all the available options into a singleamp-selector
. On line 204 it selects all[options]
within theamp-selector
, so I tried to modify the example to make this work butamp-selector
attaches thekeydown
event toamp-selector
element and not my input (Note: line 114). However, even if that did work, since the options are loaded dynamically withamp-list
, they aren't available when the component mounts. There'd also need to be a way to remount the options afteramp-list
updates.Sorry in advance if this is not the right location for this issue, if need be, I can close and reopen in amphtml.