react-pullable icon indicating copy to clipboard operation
react-pullable copied to clipboard

Moved target for touch events to the component

Open DavidBriglio opened this issue 5 years ago • 1 comments

Currently this package will only handle touch events on the whole window. If you would like to have multiple pulldowns on the same page, or have only part of the page pullable this would not work.

My pull request creates a wrapper div for the children of the component to sit in, and it is that div that the touch events will work on if the targetComponent prop is set to true.

Please test this out and consider adding it to your package!

Thank you

DavidBriglio avatar Jun 08 '20 18:06 DavidBriglio

I'm not quite sure what the default behaviour should be, since using the window would cause issues when interacting with any popups / dialogs.

DavidBriglio avatar Jun 09 '20 18:06 DavidBriglio