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

Adding and removing drops to cloned body #114

Open mfrye opened 9 years ago

mfrye commented 9 years ago

To reiterate comments from others, great job with this library. It is very useful.

I have a unique use case as well. I'm also making somewhat of a wizard and I can't figure out the right config to get this working for me. Basically I'm loading up a website in an iframe that has a live / editing mode. Editing mode clones the body and replaces it with the copy. Then I load a drop on top. When I go back to live mode I destroy the drop and replace the body with the original.

This works fine the first time, but on subsequent loads the drop will show but it's positioned at the top of the page. It's not factoring in the scroll distance. I don't know if this is some sort of initialization that happens which gets messed up when I replace the body. I'm just trying to figure out if there's a special config, or if I need to do some custom integration to make this work.

mfrye commented 9 years ago

To clarify, I'm just looking for the touchpoints on the body. I've gone through the source a bit, but was hoping you could point me in the right direction. Basically I need to reinitialization completely as if it's a new page.