Closed mgcrea closed 11 years ago
Thanks for reporting.
It seems that Bootstrap makes FastClick redundant by using touchstart
listeners with dropdowns. Is there a reason why you need FastClick even when you're using Bootstrap?
Bootstrap doesn't add touchstart to everything. It's not on buttons for instance. Seems like fastclick is the recommended solution for that, https://github.com/twitter/bootstrap/issues/3772#issuecomment-11563061
So you still need FastClick when using Bootstrap.
@nanek thanks for pointing that out. Are you more in favour of a workaround being added to FastClick, or attempting to have Bootstrap devs remove the touchstart listener for dropdowns?
Anyone else?
@nanek Thanks for submitting that pull request to Bootstrap.
Everyone else: we're trying to get this fixed in Bootstrap itself.
Even though I concur that removing touchstart is the way to go, is there a way to unregister fastclick on a certain element? The way fastclick is now, it's either everything or nothing, right?
There is a way. Add the needsclick
class to an element.
On Tuesday, 15 January 2013, VenQWish wrote:
Even though I concur that removing touchstart is the way to go, is there a way to unregister fastclick on a certain element? The way fastclick is now, it's either everything or nothing, right?
— Reply to this email directly or view it on GitHubhttps://github.com/ftlabs/fastclick/issues/48#issuecomment-12285624.
Ah crud, missed that in the advanced section, sorry for that. Thanks for the blistering fast answer. :+1:
Thanks for this @mattcg ran in to the same problem today. I would suggest you add the "needsclick" tip to the github documentation, as this article: http://labs.ft.com/articles/ft-fastclick/ says you should actually use 'clickevent'
UPDATE: submitted pull request 59
Tested on latest iOS6.
The dropdown closes itself.
Test case : http://mgcrea.github.com/angular-strap/#dropdown