amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

input-debounced doesn't always work in AMP Viewer on google results pages

Open mikeduarte opened this issue 9 years ago • 6 comments

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?

  1. 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

  1. 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

  1. 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

mikeduarte avatar Dec 05 '17 17:12 mikeduarte

/to @cvializ

dreamofabear avatar Dec 05 '17 20:12 dreamofabear

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.

cvializ avatar Dec 06 '17 00:12 cvializ

I think I might be experiencing the same problem with input-debounced, please have a look: https://github.com/ampproject/amphtml/issues/13876

sryze avatar Mar 08 '18 15:03 sryze

Ditto. Am having the same issue.

levimeirclancy avatar Aug 29 '18 07:08 levimeirclancy

This issue hasn't been updated in awhile. @cvializ Do you have any updates?

ampprojectbot avatar Dec 05 '18 03:12 ampprojectbot

The new amp-autocomplete is now launched and the recommended component to autosuggest implementations: https://amp.dev/documentation/examples/components/amp-autocomplete/?format=websites

aghassemi avatar Jun 20 '19 17:06 aghassemi