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.

Feature: Temporary disable dragging

See original GitHub issue

Thanks for the great library!

We have editable nodes which transform to a TextField when clicking on an edit button. When selecting a text in the TextField via click + mouse movement, the node is dragged unintentionally. image

To stop this behavior, we would like to disable dragging on all nodes while editing a node. We did not find any property to solve or workaround our problem.

A fix for our problem could be implemented by adding an canDrag property which can be false.

I look forward to realizing the request and can also provide support if needed.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
minop1205commented, Jul 9, 2021

v1.4.2 has been published.

There are two fixes in this version.

  1. Fixed a bug where the text in the text input box could not be selected with the mouse.
  2. added a new canDrag property.

For 1, since it is a bug, it was handled by default without any special settings. Therefore, the canDrag property is not needed to support text selection.

example: https://codesandbox.io/s/editable-ts-cl3wi

The canDrag property is not directly related to 1, but it was added to allow finer control of the tree.

0reactions
jannnikcommented, Jul 19, 2021

Thank you so much, this solves our problem excellently!

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
Temporarily disable drag-function (d3js) - Stack Overflow
Is there any way to temporarily disable the d3-dragging function of the SVG elements before inserting the first point?
Read more >
Temporarily disable draggable #157 - taye/interact.js - GitHub
Any way I could temporarily disable the draggable object? ... actionChecker function to change the action from resize to drag if the element ......
Read more >
How to disable dragging an image from an HTML page using ...
Method 1: This method sets the draggable attribute to false using jQuery. Syntax: $('#myImage').attr('draggable', false);. Example:.
Read more >
Windows 10: How to Disable Drag and Drop - Technipages
Steps to Disable Drag and Drop on Windows 10 · Click on the Windows Search bar and type regedit. · Double-click on 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