Opened 9 years ago

Closed 9 years ago

#6256 closed bug (fixed)

jQuery UI 1.8.5 .resizable behaves differently with jQuery 1.4.4 than 1.4.2 (refiling #6238)

Reported by: ken.penn Owned by:
Priority: minor Milestone: 1.8.6
Component: ui.resizable Version: 1.8.5
Keywords: Cc:
Blocked by: Blocking:

Description

Hello Scott - I just listened to you on the jQuery podcast, and my earlier submission was a poster child for the kind you don't want. My apologies.

I have created a reduced test case, using jQuery and UI only for the test case. The pages below have only the test case, an explanation of the issue, and firebug screenshots highlighting the issue.

All extraneous jQuery UI files and plugins have been removed. The two js files I added are each three lines long. The css is reduced to the minimum.

Here is the issue again:

I have a textarea wrapped in jQuery UI 1.8.5 .resizable(). The textarea behaves as I'd wish, with jQuery-1.4.2, and jQueryUI-1.8.5.

When I switched to jQuery-1.4.3 or jQuery-1.4.4.git, .resizable() did not behave as I'd expect; it required chaining .css('margin', '0px') to get the texarea centered in the resizable wrapper.

I have prepared three examples:

How the textarea .resizable() worked with 1.4.2 is http://kpenn.com/tst-ta/tst-ta.0.html

How the textarea .resizable() did not center with 1.4.4.git is http://kpenn.com/tst-ta/tst-ta.1.html

How the textarea .resizable() centered with 1.4.4.git and a chained .css() is http://kpenn.com/tst-ta/tst-ta.2.html

Thanks,

Ken Penn(ken.penn.fx@…)

Attachments (1)

6256.html (580 bytes) - added by Scott González 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Scott González

Attachment: 6256.html added

comment:1 Changed 9 years ago by Scott González

Milestone: TBD1.9

Thanks Ken. I've reduced the test case to the least amount of code as possible and attached it.

The problem comes from us moving the margins from the textarea to the generated wrapper. We copy the margins over individually, then set the margins on the textarea to 0 individually. Then later we set the shorthand margin to whatever it already was (according to a comment right above this line of code this is done to avoid a jump in IE). In jQuery 1.4.2, when we ask for the shorthand margin, we get "0px" but in jQuery 1.4.3 we get "".

I'll see if I can figure out why we do this instead of just setting the margin to 0 and also why the behavior in jQuery core changed.

comment:2 Changed 9 years ago by Scott González

This is a bug in jQuery 1.4.3 and has been fixed in the 1.4.4 RCs.

comment:3 Changed 9 years ago by Scott González

#6708 is a duplicate of this ticket.

comment:4 Changed 9 years ago by Scott González

Milestone: 1.91.8.6
Resolution: fixed
Status: newclosed

jQuery 1.4.4 has been released and fixes this issue.

Note: See TracTickets for help on using tickets.