Skip to main content

Search and Top Navigation

#3276 open bug ()

Opened September 01, 2008 07:31PM UTC

Last modified October 27, 2012 02:10AM UTC

"AlsoResize" should be relative to this.element

Reported by: anonymous Owned by: eduardo
Priority: minor Milestone: 2.0.0
Component: ui.resizable Version: 1.6b
Keywords: Cc:
Blocked by: Blocking:

The element '.ui-resizable-also' in the example below should be relative to this.element just like the ui-resizable-handle.

$('ui-resizable').resizable({alsoResize: '.ui-resizable-also'});

Using the workaround below doesn't work (get an exception in _start):

$('.ui-resizable').each(function(){ $(this).resizable({alsoResize: $('.ui-resizable-also', this)}); });

My patch is:

--- ui.resizable.orig.js 2008-08-18 11:34:59.673873000 +0100

+++ ui.resizable.js 2008-09-01 20:25:13.702663000 +0100

@@ -730,7 +730,7 @@

if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }

else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }


- _store(o.alsoResize);

+ _store($(o.alsoResize, this.element));



@@ -758,7 +758,7 @@

if (typeof(o.alsoResize) == 'object') {

$.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });


- _alsoResize(o.alsoResize);

+ _alsoResize($(o.alsoResize, this.element));



Attachments (0)
Change History (6)

Changed January 02, 2009 02:42PM UTC by scottgonzalez comment:1


Changed November 13, 2009 07:33PM UTC by scottgonzalez comment:2

milestone: 1.next1.8

Depends on #4957.

Changed November 13, 2009 07:33PM UTC by scottgonzalez comment:3

Also see #4666.

Changed October 11, 2012 02:52PM UTC by scottgonzalez comment:4


Changed October 27, 2012 01:38AM UTC by tj.vantoll comment:5

@scott.gonzalez Not sure if you remember this from 3 years ago but I'm curious how this is different from #4666. It seems that they're saying the exact same thing, should one be closed as a duplicate?

Changed October 27, 2012 02:10AM UTC by scottgonzalez comment:6

status: newopen

This ticket is about the other element being contained inside the resizable, while #4666 is about being able to resize more than just one element. They're only kind of related, I'm not sure why I felt it was important to link the tickets, other than the fact that they affect the same option.

My suggested solution for #4957 would make selectors search within the resizable element, which would give the requested behavior; but it would also make the option accept a function which would allow resizing elements outside of the resizable element. Based on that, I'm inclined to mark this as valid, though I'd like to review all the places where we accept selectors and see how consistent we are.