Git Product home page Git Product logo

Comments (12)

yujingz avatar yujingz commented on June 13, 2024 44

It's because of the default HTML5 drag API. if you change your img tag to

<img id="layout" draggable="false" src="img/layout.png" />

it should work as expected

from react-draggable.

javierjmx avatar javierjmx commented on June 13, 2024 3

Hi again! It would be nice to add this "issue" to the documentation. Don't you think so?

from react-draggable.

sreetamdas avatar sreetamdas commented on June 13, 2024 3

Doesn't work anymore, even after adding draggable="false", is there a fix to this?

from react-draggable.

TSMMark avatar TSMMark commented on June 13, 2024 3

@sreetamdas You could use a better package like https://github.com/clauderic/react-sortable-hoc

from react-draggable.

mahendrak001 avatar mahendrak001 commented on June 13, 2024 1

thanks

from react-draggable.

javierjmx avatar javierjmx commented on June 13, 2024

Wow! It works now. Thanks @yujingz.

from react-draggable.

STRML avatar STRML commented on June 13, 2024

Agreed. I added a note to the README.

from react-draggable.

javierjmx avatar javierjmx commented on June 13, 2024

Thanks.

from react-draggable.

TSMMark avatar TSMMark commented on June 13, 2024

What do you guys think about an opt-in behavior which finds all child img elements and set draggable="false" on them?

disableImgDraggable=true or something

from react-draggable.

JessieZheng2015 avatar JessieZheng2015 commented on June 13, 2024

so good~

from react-draggable.

STRML avatar STRML commented on June 13, 2024

Happy to address the issue if someone can reproduce it and produce a fix.

This isn't a relationship where I provide you software in exchange for money. This is a community project. If it doesn't work for your use case, either produce a good bug report, or better yet, find a way to make it work for your use case and contribute the code. That's the only way it gets better.

from react-draggable.

vagechirkov avatar vagechirkov commented on June 13, 2024

It's because of the default HTML5 drag API. if you change your img tag to

<img id="layout" draggable="false" src="img/layout.png" />

it should work as expected

Wow, amazing, it works! Thank you!!

from react-draggable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.