My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 5677: Bug: Using FT's FastClick with stops the user from being able to use options underneath Map and Satellite buttons touch devices
25 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


Sign in to add a comment
 
Reported by [email protected], Jul 31, 2013
Using FT's FastClick with stops the user from being able to use options underneath the [Map] and [Satellite] buttons on touch devices.

I have been testing on an iOS6 iPhone 4S.

My test case is an adapted version of:
https://developers.google.com/maps/documentation/javascript/examples/map-simple 

Without FastClick:
http://mattandre.ws/nofastclick
(Expected: http://mattandre.ws/nofastclick/expected.png)

With FastClick:
http://mattandre.ws/fastclick
(Actual: http://mattandre.ws/fastclick/actual.png)

We've been tracking this bug on the FastClick repository here: https://github.com/ftlabs/fastclick/issues/119 and have a suggested workaround but would it be possible to fix this at your end too?  (Other than this - Google Maps and FastClick seem to work great together!)

I'm currently trying to revive my Nexus 7 so that I can test this on that too - I'll post an update later on. 

Many thanks,

Matt

* What is FastClick?
FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers.  Read more about it at http://github.com/ftlabs/fastclick.

Here is a slide from a presentation by one of your colleagues from the Chrome Dev relations team recommending the use of it. 
http://petelepage.com/presentations/2012/qcon/#10
Jul 31, 2013
#1 [email protected]
Typo: Using FT's FastClick with [Google Maps API]** stops.. etc
Jul 31, 2013
#2 [email protected]
The problem seems worse (again iOS6 / iPhone 4S) using a more advanced example:

https://developers.google.com/maps/documentation/javascript/examples/control-options

FastClick: http://mattandre.ws/fastclick/advanced.html
No FastClick: http://mattandre.ws/nofastclick/advanced.html

With FastClick the top right hand side's dropdown does not accept touch input.  (It doesn't do anything)
Jul 31, 2013
#3 [email protected]
Nexus 7 has woken up - exactly the same issues.
Aug 26, 2013
#4 [email protected]
(No comment was entered for this change.)
Labels: Internal-10496385
Aug 27, 2013
#5 [email protected]
Hi Matt,

It's not entirely clear what is needed here to get the libraries to play well together. Looking at the bootstrap change
https://github.com/twbs/bootstrap/pull/6488
it looks like they removed touchstart event listening from their dropdowns altogether. That doesn't seem to be a viable solution for getting interoperation with most libraries. Am I just missing a better solution?
Aug 27, 2013
#6 [email protected]
Hi bcke...,

I agree that removing all touch start listeners would not be a good idea but is there a particular reason why the UI buttons need to have touch start listeners on them?  In this case could the buttons not just have click listeners instead?

Thanks,

Matt


Aug 27, 2013
#7 [email protected]
Honestly I'm surprised that v3 works as well as it does with FastClick given the number of times we do use touchstart :)

I'm trying to figure out what's happening here. Is there a good example of FastClick working with a library that does use touchstart? Is the problem just that your listeners are clobbering ours, or is the combination of the two just making what appear to be multiple clicks on the elements?
Aug 28, 2013
#8 [email protected]
Ok I have had a chance to look into this a bit more.  This isn't caused by onTouchStart, it's caused by what we do onTouchEnd...

The way your dropdown opens & the way labels appear beneath the Map/Satellite buttons seem to have some slightly odd logic - on iOS it *seems* to be some time after touch end...  (I think you're mapping something onto what would be the mouseover event on Desktop, maybe?) and by synthesising a click on the button (rather than letting the touchEnd go through as normal) we seem to be preventing that logic from running.

That's about the limit the diagnosis I can do with minified javascript?  Is there any way we could see the original pre-minified source to debug this further?

Incidentally one thing that I suspect might fix this: if your buttons were <button>s and dropdowns were <select>s (rather than <div>s and, <div>s) our library would not get in the way at all :-).
Apr 2, 2015
Project Member #9 [email protected]
(No comment was entered for this change.)
Status: Accepted
Sign in to add a comment

Powered by Google Project Hosting