Skip to main content

Search and Top Navigation

#6256 closed bug (fixed)

Opened November 03, 2010 12:56AM UTC

Closed December 01, 2010 03:17AM UTC

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@gmail.com)

Attachments (1)
  • 6256.html (0.6 KB) - added by scottgonzalez November 03, 2010 12:48PM UTC.
Change History (4)

Changed November 03, 2010 12:54PM UTC by scottgonzalez comment:1

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.

Changed November 03, 2010 09:21PM UTC by scottgonzalez comment:2

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

Changed December 01, 2010 03:16AM UTC by scottgonzalez comment:3

#6708 is a duplicate of this ticket.

Changed December 01, 2010 03:17AM UTC by scottgonzalez comment:4

milestone: 1.91.8.6
resolution: → fixed
status: newclosed

jQuery 1.4.4 has been released and fixes this issue.