Jump to content
Search Community

Draggable in React Modal

GreggD test
Moderator Tag

Recommended Posts

I'm trying to use Draggable in a React (17.0.2) app.  I've copied the example at  into my app to ensure it works there and to learn more about how to use Draggable.  It works great.  

 

The problem I have is when I use the same CodePen code, placing the div (id="wrapper") block within a React Modal. The image renders but the dragging functionality does not work.  I've tried different id names and a new Draggable.Create within the component that shows in the modal, but still nothing.  I'm not seeing the style attribute with transform on the img element as I do in the main tsx window. 

 

I've looked through the parent elements' CSS and tried modifying different position and overflow values to no avail.  The main deviation from the example CodePen is the Modal parent around the wrapper div.

 

 

 

 

See the Pen abNGbE by jonathan (@jonathan) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...