input-debounced doesn't always work in AMP Viewer on google results pages
What's the issue?
We implemented autosuggest on our site. In Chrome 62+ and on iOS 11+ Safari, it seems as though input-debounced doesn't always work in the AMP viewer when either the input is in a sidebar or possibly when there are more than one inputs on the page. Not sure exactly what the issue is.
How do we reproduce the issue?
- In desktop Chrome 62+ go to the following two URLs and click on the hamburger menu at the top right of screen and type phi in the input. You should see the autosuggest works and the results change after each character (input-debounced fires after every keypress):
https://www-tollbrothers-com.cdn.ampproject.org/c/s/www.tollbrothers.com/?amp=true https://www.tollbrothers.com/?amp=true
- In desktop Chrome 62+ (as a phone in dev tools) or in Safari on an iPhone with iOS 11+ go to the following URL and do the same as step 1. Notice the input-debounced seems to only fire once and without the value of the input. Note: Clicking on the URL below may not launch in the google AMP viewer on desktop.
https://www.google.com/amp/s/www.tollbrothers.com/luxury-homes/%3famp=true
- As a sanity check, go to all 3 URLs in the same device/browser and locate the input in the middle of the page that is below the heading labeled "Start your new home search". Type phi and verify that it works as expected in all 3 URLs.
What browsers are affected?
iOS 11+ Safari desktop Chrome 62+
Which AMP version is affected?
1510956201635
/to @cvializ
I can't reproduce on any other sites in the viewer using input-debounced, like urban dictionary, but I do see the issue on your page. I will investigate more soon, but it doesn't look like it affects the input-debounced action in the viewer generally.
I think I might be experiencing the same problem with input-debounced, please have a look: https://github.com/ampproject/amphtml/issues/13876
Ditto. Am having the same issue.
This issue hasn't been updated in awhile. @cvializ Do you have any updates?
The new amp-autocomplete is now launched and the recommended component to autosuggest implementations: https://amp.dev/documentation/examples/components/amp-autocomplete/?format=websites