anseki / plain-draggable

The simple and high performance library to allow HTML/SVG element to be dragged.
https://anseki.github.io/plain-draggable/
MIT License
773 stars 99 forks source link

Input inside of draggable #35

Closed spgonejoker closed 5 years ago

spgonejoker commented 5 years ago

Hello @anseki i want do edit a text inside a draggable (like this: https://codepen.io/spgonejoker/pen/NWWwddK). The div container should be fully draggable, but the elements inside don't need to be draggable for the full container.

Maybe you have an idea how to do this :) The last time you were a big help :+1:

Greetings

anseki commented 5 years ago

Hi @spgonejoker, thank you for the comment. Sorry, my English is poor. What does this mean? : "the elements inside don't need to be draggable" Do you mean that you want to make the elements inside avoid accepting "mouse-drag" event?

spgonejoker commented 5 years ago

Hi @anseki Yes right :)

anseki commented 5 years ago

You can specify an element that accepts the event for handle option. The element doesn't contain the elements that should avoid accepting the event. For example: https://jsfiddle.net/bvyedxp3/

spgonejoker commented 5 years ago

Hi @anseki Thanks for this idea. I have never thought, that something would work this way :)

anseki commented 5 years ago

:smile: