Skip to content

max-height (and possibly max-width) doesn't work correctly #997

@alexsaalberg049

Description

@alexsaalberg049

Subject of the issue

If you drag a tile past it's max-height the 'shadow' will grow past the max-height and push objects. When you release this 'shadow' the tile will behave as though it is taller than it appears.

It seems like this can only happen if the height is less than max-height when you begin resizing the tile.

Your environment

  • version of gridstack.js - 0.4
  • which browser and its version - chrome

Steps to reproduce

https://jsfiddle.net/alexsaalberg_propro/h8p20u6z/

  1. Click 'Widget 2'
  2. Drag the tile that appears (with the text "two") from the top '.grid-stack' into the lower '.grid-stack'.
  • Drag it on top of an existing tile so that the existing tile is pushed and when you release it there are tiles directly below it.
  1. Resize the same "two" tile to (and beyond) its' max height.

Expected behaviour

The "two" tile stops growing vertically after reaching a height of 3.

Actual behaviour

The "two" tile stops growing vertically after reaching a height of 3, but only visually.
The 'shadow'/'outline' continues to grow however far you drag, pushing existing tiles in it's way.
When you release the mouse the tile behaves functionally as though it has a height greater than 3.

Edit: You can also observe the 'glitchy' 'extra-height-which-is-invisible' by dragging the glitched tile around. The 'shadow'/'outline' will show the true size of the tile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions