Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 h5 not draggable when content is table/span #1511

Closed
gondias opened this issue Dec 2, 2020 · 2 comments · Fixed by #1523
Closed

V3 h5 not draggable when content is table/span #1511

gondias opened this issue Dec 2, 2020 · 2 comments · Fixed by #1523
Labels

Comments

@gondias
Copy link

gondias commented Dec 2, 2020

Hi,
Was checking the latest version and found an issue when the content of the tile is a table using 100% of width and height of the available space. In this case the drag does not happen, therefore it will not work. Was going through older versions and that is not an issue. In the case of the content being a div it works

I am using V3.0.0 and not using the jquery.
I am referencing gridstack.css and gridstack-h5.js

I am using chrome Version 87.0.4280.66
and also tested it with firefox version 82.0.2

Here you should be able to reproduce it:
https://jsfiddle.net/gondias/2b5hxnvm/2/

If you comment line 28 and uncomment line 25 you will notice it is not possible to drag the tiles in the grid.
If you comment line 25 and uncomment line 28 you will notice it is possible to drag the tiles in the grid.

Kind regards

@adumesny
Copy link
Member

adumesny commented Dec 2, 2020

thanks I simplified the test
https://jsfiddle.net/adumesny/wuj69dcL/

it works IFF you click outside the div/table content (in both cases.. clicking on span will NOT work either (eats the event).
but with that said, switching to jq version works, so something we might be able to do. Need to research native drag event propagation...

@typescriptguru
Copy link

but with that said, switching to jq version works, so something we might be able to do. Need to research native drag event propagation...

@adumesny in jq version, dragging input type element does not work.

@adumesny adumesny changed the title V3.0.0 - Reposition a tile inside a grid - issues when content is table V3 h5 not draggable when content is table/span Dec 6, 2020
adumesny added a commit to adumesny/gridstack.js that referenced this issue Dec 7, 2020
* fix gridstack#1511
* you can now click any grid item content and drag away
* added sample test case
@adumesny adumesny mentioned this issue Dec 7, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants