Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Fastclick breaks Google Closure autocomplete widgets on mobile devices #117

Open
stevebuik opened this issue May 26, 2013 · 7 comments
Open

Comments

@stevebuik
Copy link

If you use a closure autocomplete like the one here

http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/autocomplete-basic.html

and add Fastclick to the page then selection of matched items when typing does not work on touch devices. I've tested on iPad Chrome/Safari and Android Chrome and it breaks consistently on all of these.

What happens is that the autocomplete dropdown is dismissed but the value that was tapped does not get loaded into the input element.

It's a tough one to debug because it only reproduces on touch devices and I don't have a remote debugger for these browsers. Logging this bug in the hope that someone knows a simple workaround - my current workaround is to disable fastclick.

@dryabov
Copy link

dryabov commented May 26, 2013

goog.ui.ac listen to mousedown event, but fastclick doesn't trigger it.

In your case it's possible to override needsClick function to check for ac-renderer class in addition to needsclick.

PS. Are you sure that loading of 59 javascripts (1Mb in total) for just autocomplete is a good idea (especially on smartphones)?

@stevebuik
Copy link
Author

Thanks for the fast reply. I'll take a look and see if I can work out a patch. I'm no js wizard so might take me a bit of time.

I'm actually using clojurescript to build my app and thus the google closure compiler does a good job of stripping out all the unused code for production use - the test case in the bug report is just a good place to show the problem.

@bmatto
Copy link

bmatto commented Oct 1, 2014

Seems like this affecting google places autocomplete as well.

@craigstar
Copy link

same issue here. Have you figured it out? @stevebuik

@stevebuik
Copy link
Author

No I just avoided it and since then have stopped working on the project.
Sorry but nothing new to report

Regards, Steve Buikhuizen

http://www.linkedin.com/in/stevebuikhuizen

Mob: +61 416426414

On 4 April 2016 at 23:59, craigstar notifications@github.com wrote:

same issue here. Have you figured it out? @stevebuik
https://github.com/stevebuik


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#117 (comment)

@craigstar
Copy link

I worked it out yesterday. not sure if this("needsclick" class) is the new
feature. But this conversation really helps.
#347

On Mon, Apr 4, 2016 at 5:49 PM, Steve Buikhuizen notifications@github.com
wrote:

No I just avoided it and since then have stopped working on the project.
Sorry but nothing new to report

Regards, Steve Buikhuizen

http://www.linkedin.com/in/stevebuikhuizen

Mob: +61 416426414

On 4 April 2016 at 23:59, craigstar notifications@github.com wrote:

same issue here. Have you figured it out? @stevebuik
https://github.com/stevebuik


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#117 (comment)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#117 (comment)

@guilhermeosmium
Copy link

Find / \bneedsclick\b/
And Replace by /\bpac-item\b|\bneedsclick\b|\bpac-container\b/
Full Command( return/\bpac-item\b|\bneedsclick\b|\bpac-container\b/.test(t.className) )

In fast-click.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants