react-anything-sortable icon indicating copy to clipboard operation
react-anything-sortable copied to clipboard

Problem with Contenteditable div

Open dineshvgp opened this issue 8 years ago • 6 comments

I'm in a situation where I need to render a contenteditable div.

So, just tried it by adding contenteditable div in demoItem.js. Then, whenever I click inside the div, cursor focuses at starting point of the text, not at the place where I clicked.

Please help me out.

dineshvgp avatar Apr 21 '16 14:04 dineshvgp

Can you provide some snippet or working demo?

jasonslyvia avatar Apr 21 '16 14:04 jasonslyvia

Please clone this forked repo. Start the app and hit http://0.0.0.0:8722/#/handle

Now, in DemoItem.js, removing inline: true , which is in line 26 will work fine.

But I need to pass inline: true, as I need to fix the toolbar to the place I need.

dineshvgp avatar Apr 22 '16 15:04 dineshvgp

After cloning your repo, I fail to figure out how tinymce.js works.

Can you confirm it works without react-anything-sortable? By adding three elements in the same page with indentical settings. If so, there might be some event collision( which I don't think probable because I've commented out event handlers in SortableItemMixin but the issue remains).

jasonslyvia avatar Apr 23 '16 14:04 jasonslyvia

So, I removed mixins: [SortableItemMixin], and this.renderWithSortable from DemoItem.js. It works as expected. Could you please check the same?

dineshvgp avatar Apr 23 '16 15:04 dineshvgp

Yeah I'm sorry kinda busy these days, need to dive into tinymce to figure out why they don't work together.

jasonslyvia avatar Apr 25 '16 02:04 jasonslyvia

This is because old version was capturing onSelect event on non-IE browsers. Fixed in #57

hvergara avatar Sep 26 '16 19:09 hvergara