GreggD Posted April 12, 2022 Share Posted April 12, 2022 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 More sharing options...
OSUblake Posted April 12, 2022 Share Posted April 12, 2022 Welcome to the forums @GreggD It's hard answer a question seeing the problem. Can you make a demo showing what you've tried? You can use Codesandbox if you want. Also, I would recommend checking out our React guides. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now