divs with contenteditable="true" are not editable
In the following example:
<div class="draggable">
<div id="edit" contenteditable="true"></div>
</div>
The div with id="edit" will not behave normally as a div with contenteditable="true" would. I think the click event is somehow getting intercepted by interact.js. However an <input> element will work just fine.
I've recently discovered this same issue as well, and I'm wondering if you found a solution? The best I've found so far is to manually disable/enable the draggable as a work around, but I'd love to hear if there is a better approach.
More of a workaround but i've just been using a handle. Don't know if that suits your use.
HTML:
<div class="text-container drag-element">
<div id="text1" class="handle text-handle">
<!-- Handle contents -->
</div>
<div class="editdiv resize-element" contenteditable="true" style="width: 379px; height: 200px;">
</div>
</div>
Javascript:
interact('.drag-element')
.draggable({
inertia: false,
restrict: {
restriction: "parent",
endOnly: false,
elementRect: { top: 0, left: 0, bottom: 1, right: 1 }
},
autoScroll: true,
onmove: dragMoveListener
})
.allowFrom('.handle');
interact('.resize-element')
.resizable({
edges: { left: true, right: true, bottom: true, top: false},
onmove: resizeMoveListener
});
Other approaches that may work are to chain .preventDefault('never') on your interactable, though this may well cause other issues.