question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove draggable attribute in nodes.

See original GitHub issue

Do you want to request a feature or report a bug?

Now every node will wrap with a div container with draggable attribute, this will conflict with customized dnd features, source: https://github.com/ianstormtaylor/slate/blob/3339d088e14ad0bf04a674c14834179403ae369f/packages/slate-react/src/components/void.js#L79

Code source: https://github.com/Canner/slate-editor-icons/blob/master/packages/slate-editor-renderer/src/ImageNode.js#L128

You could try it live here: https://canner.github.io/slate-editor-icons/

What’s the current behavior?

Wrap every node with draggable attribute.

What’s the expected behavior?

The attribute should be remove.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ianstormtaylorcommented, Mar 26, 2018

I’m down for it to be opt-in. If whoever submits the PR can also make it so that the images and emoji examples remain draggable that would be perfect.

0reactions
ianstormtaylorcommented, Nov 28, 2019

I believe that this may be fixed by https://github.com/ianstormtaylor/slate/pull/3093, which has changed a lot of the logic in Slate and slate-react especially. I’m going to close this out, but as always, feel free to open a new issue if it persists for you. Thanks for understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JS Disable drag and drop (draggable attribute) - Stack Overflow
I would like to be able to make the drag permanent. That is, once an element is dragged (or dropped I guess) ONCE,...
Read more >
draggable - HTML: HyperText Markup Language | MDN
The draggable global attribute is an enumerated attribute that indicates whether the element can be dragged, either with native browser ...
Read more >
How to Disable Dragging an Image from an HTML Page?
One way to disable dragging an image from an HTML page is to set the ondragstart property of an image element to a...
Read more >
How to disable a jQuery-ui draggable of widget - GeeksforGeeks
$( ".selector" ).draggable({ disabled: true/false });. CDN Link: First, add jQuery UI scripts needed for your project.
Read more >
useDraggable - @dnd-kit – Documentation
When attaching the listeners to a different element than the node that is draggable, make sure you also attach the attributes to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found