marceljuenemann / angular-drag-and-drop-lists

Angular directives for sorting nested lists using the HTML5 Drag & Drop API
MIT License
2.16k stars 713 forks source link

Drag And Drop of input elements inside parent not working on safari ( mac ) #452

Open utsav-github opened 6 years ago

utsav-github commented 6 years ago

Trying to drag and drop text box inside drag gable div element in safari (mac) . In chrome its's working fine,but in safari dragging of text box to another element restricted. I also append span inside and it is working fine, but next to span , a textbox drag is not working correctly. https://jsfiddle.net/Utsav_fiddle/fxtdtbr9/ Can anyone suggest a fix ?

jaymanned commented 6 years ago

+1

jaymanned commented 6 years ago

Has anyone found a way around this?

jaymanned commented 6 years ago

Found a workaround. Replacing inputs and textareas with contenteditable spans and divs. You'll have to adjust things like readonly attributes or form submiting. You'll need to bind the ngModel controller using a directive like this one . And you can add placeholder support via CSS.. It's a little bit of work but after that, it works like a charm.