HubSpot / drop

A library for creating dropdowns and other floating elements. #hubspot-open-source
http://github.hubspot.com/drop/docs/welcome
MIT License
2.36k stars 210 forks source link

Is there a way to temporarily disable a Drop popup? #147

Open josephrocca opened 8 years ago

josephrocca commented 8 years ago

In trying to work around issue #146 (touch screen users can't scroll without triggering popups) I've got the following plan: If touchstart event fires, disable all Drop popups. On release (touchend), check if the disance from the original touchstart is small. If it is, I'll count it as a click and trigger the drop (if any) below their finger. If it is large, it was a "scroll" event, so no drops get triggered.

In both cases, I disable all Drops at touchstart and enable them all after processing touchend as described above.

So, is there a way to disable the Drop popups temporarily? I imagine this would involve un-attaching the event listeners, but I'm not sure what Drop is doing in the background.

Thanks

josephrocca commented 8 years ago

For others with similar issues, I explained how I got around it in #146