Ticket #3026 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

resizable resize handler is called too early

Reported by: rdworth Owned by: rdworth
Priority: critical Milestone: 1.5.1
Component: ui.resizable Version: 1.5
Keywords: resize callback early Cc:
Blocking: Blocked by:

Description

The resizable resize callback is called before the element is resized, and before the position and size properties (which are passed as ui.position and ui.size) are updated. This makes it so that any callback that wants to respond to a resize event is always one step behind, since it gets the before value instead of the after value.

Change History

comment:1 Changed 6 years ago by rdworth

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

Fixed in [337]

comment:2 Changed 6 years ago by eduardo

Small update on this fix. Plugins callbacks need to be called first than user's callbacks.

comment:3 Changed 5 years ago by LooseCannon

Can you please explain: "Plugins callbacks need to be called first than user's callbacks.". I'm experiencing the same issue with the resize callback being called before the element is resized, and before the position and size properties.

$(obj).resizable({

stop: function(event, ui) {

alert(ui.size.width + " : " + ui.size.height);

}, handles: "all", animate: true

});

Note: See TracTickets for help on using tickets.