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.

Can't generate draggable elements using attributes module

See original GitHub issue

When I try to generate a draggable element using h('div', {attrs: {draggable: 'true'}}, 'text') I get <div draggable>text</div> instead of <div draggable="true">text</div>. The former element is not draggable in browsers.

The problem is that the attributes module treats “draggable” as a boolean attribute, while it isn’t (according to MDN “true” value must be provided).

Otherwise, I love this library! It was easy to integrate into an existing project and performance is amazing. Thanks for the great work!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pme123commented, Jun 22, 2017

when will this fix be released?

0reactions
paldepindcommented, Jul 27, 2017

This has been fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recommended way of making React component/div draggable
Use getDragState(type) and getDropState(type) to learn if dragging is active and use it to toggle CSS classes or attributes; · Specify dragPreview to...
Read more >
An Essential Guide to JavaScript Drag and Drop By Examples
This tutorial introduces you to the JavaScript Drag and Drop API and shows you how to handle drag and drop events effectively.
Read more >
Using the HTML5 Drag and Drop API - web.dev
The HTML5 Drag and Drop API means that we can make almost any element on our page draggable. In this post we'll explain...
Read more >
How to Add Drag and Drop in React with React Beautiful DnD
We'll be focusing on adding the ability to drag and drop to rearrange the list using React Beautiful DnD. Step 0: Creating a...
Read more >
Docs | Plugins | Draggable - GreenSock
Provides a surprisingly simple way to make virtually any DOM element draggable, spinnable, tossable, and even flick-scrollable using mouse and/or touch ...
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