Ticket #7605 (closed bug: fixed)

Opened 3 years ago

Last modified 17 months ago

Resizable: Plugin sets width and height when only one is changing

Reported by: atrigent Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.resizable Version: 1.8.14
Keywords: haspatch Cc:
Blocking: Blocked by:

Description

We have an element which we want to be resizable vertically and hold only its height consistent. The width should be dynamic and dependent on the container size and other factors.

resizable sets both the height and width, even if only one of those values is actually changing. In our case, this causes the width to be set as a constant number of pixels and breaks our desired dynamic layout. We are currently working around this by clearing the width setting in the resize handler, but this is a hack and shouldn't be necessary.

Change History

comment:1 Changed 19 months ago by eromba

Here is a test case:

 http://jsbin.com/ebijab

I've submitted a pull request with a fix and unit test here:

 https://github.com/jquery/jquery-ui/pull/694

comment:2 Changed 19 months ago by scott.gonzalez

  • Milestone changed from 1.9.0 to 2.0.0

comment:3 Changed 18 months ago by tj.vantoll

  • Keywords haspatch added
  • Status changed from new to open
  • Summary changed from Setting width and height when only one is changing to Resizable: Plugin sets width and height when only one is changing

comment:4 Changed 18 months ago by tj.vantoll

#3634 is a duplicate of this ticket.

comment:5 Changed 18 months ago by tj.vantoll

Another test case from the duplicate ticket -  http://jsfiddle.net/tj_vantoll/FCF4N/.

comment:6 Changed 17 months ago by Ethan Romba

  • Status changed from open to closed
  • Resolution set to fixed

Resizable: Update CSS dimensions selectively. Fixes #7605 - Setting width and height when only one is changing

Resizable: Trigger resize event only when element is resized. Fixes #5545 - Callbacks ignore the grid.

Resizable: Added event tests. Fixes #5817 - resize event reports unconstrained ui.size

Changeset: 3974b55ba5078799df818c78d9273e11d9796ff3

comment:7 Changed 17 months ago by mikesherov

  • Milestone changed from 2.0.0 to 1.10.0
Note: See TracTickets for help on using tickets.