Visitar URL original
Resizing window below minWidth doesn't prevent dragging and resizing · Issue #593 · gridstack/gridstack.js · GitHub
Skip to content

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

Closed

Description

@graemechapman

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/

Activity

  1. radiolips commented on Apr 20, 2017

    @radiolips
    Member

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

  2. self-assigned this
    on Apr 20, 2017
  3. added this to the v0.3.0 milestone on Apr 20, 2017
  4. added a commit that references this issue on Apr 20, 2017
    f1a407b
  5. added a commit that references this issue on Apr 20, 2017
    7ff2990
  6. radiolips commented on Apr 20, 2017

    @radiolips
    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.

  7. graemechapman commented on Apr 21, 2017

    @graemechapman
    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions