Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Resizing window below minWidth doesn't prevent dragging and resizing #593

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

Closed
graemechapman opened this issue Jan 19, 2017 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@graemechapman
Copy link

When gridstack is initialised below the minWidth value, the grid items have classes ui-draggable-disabled ui-resizable-disabled and cannot be dragged or resized. If the window is resized to above the min width, these classes are removed and the drag and resize functionality is restored.

But, when the window is resized from a larger size to below the minWidth, these classes are not re-applied, and so resizing and dragging is not prevented. Although dragging has no visible effect, changes are still made to the attributes, which can be seen in dev tools or by enlarging the window, and the change event is triggered.

This issue can be replicated by resizing the browser window on the demo page http://troolee.github.io/gridstack.js/

@radiolips
Copy link
Member

@graemechapman This is an awesome bug. brb, got some code to examine.

@radiolips radiolips self-assigned this Apr 20, 2017
@radiolips radiolips added this to the v0.3.0 milestone Apr 20, 2017
radiolips added a commit that referenced this issue Apr 20, 2017
@radiolips
Copy link
Member

@graemechapman Looks like this was something I broke some time ago. I've run a test with the change and it works for me. Check out the develop branch and let me know if you're still seeing a problem.

@graemechapman
Copy link
Author

@radiolips thanks, looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants