Can't generate draggable elements using attributes module
See original GitHub issueWhen 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:
- Created 7 years ago
- Comments:9 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
when will this fix be released?
This has been fixed.