Gridstack.js: Input type elements cannot be dragged when it has parent div (ex. text, select, numeric types)

Created on 3 Dec 2020  路  9Comments  路  Source: gridstack/gridstack.js

Subject of the issue

I am building form builder using gridstackjs, so users can drag form element from outside inside the form, and move/resize inside the form.
<input type="text"/> cannot be draggable if it has parent div,
I also noticed normal div cannot be dragged if it has parent div.

Your environment

I am using v3.0.0, and tested on html5 native dnd.

Steps to reproduce

Here's demo you can reproduce - https://jsfiddle.net/cwrjq5z3/9/

Expected behavior

Input should be able to be draggable no matter it has div as parent or not.

Actual behavior

Input is not dragged when it has parent div

enhancement

All 9 comments

thanks for good example. maybe same issue as #1511 ?

you say: " in jq version, dragging input type element does not work." so did this ever worked on any version or is that a feature request then ?

re-opening since separate issue.

Dragging input never worked with jq version.
So I tried html dnd, and it seemed working at first time, but when I add parent div to input element, it stopped working.
I think fixing #1511 will fix this issue.

did you use older version of gridstack before where it used to work or are you new to using it ?

I tried v2.2.0 which only supports jquery ui dragging, and input dragging did not work.
I tried to set cancel: null in draggable option, and input dragging seemed working, but then focus/editing the input element stopped working

@adumesny Do we have any ETA for this to be fixed?

whoa, you just filed it and asking when it will be fixed already ? you are welcome to make a fix suggestion or contribute $ to help this project...

fixed in upcoming 3.1.1

Thank you, @adumesny

Was this page helpful?
0 / 5 - 0 ratings