Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Ticket #4334

3 views
Skip to first unread message

NickUK

unread,
Mar 18, 2009, 1:43:47 PM3/18/09
to jQuery UI Development
I can't reopen this as I get permission denied.

The demo just highlights the fact that resizables is broken. This
should be reopened and fixed for 1.6.

Scott González

unread,
Mar 18, 2009, 1:52:27 PM3/18/09
to jquery...@googlegroups.com
I've re-opened the ticket, I'll be working on it this week.

NickUK

unread,
Mar 18, 2009, 1:58:31 PM3/18/09
to jQuery UI Development
Thanks Scott. I probably should have named the ticket differently and
explained myself better (noob!).
> > should be reopened and fixed for 1.6.- Hide quoted text -
>
> - Show quoted text -

Scott González

unread,
Mar 18, 2009, 1:59:46 PM3/18/09
to jquery...@googlegroups.com
No problem, I forgot the demos were released with 1.6 and couldn't figure out how you were getting to the old demos.

NickUK

unread,
Mar 25, 2009, 5:35:23 AM3/25/09
to jQuery UI Development
Hi Scott, I see you submitted a fix in r2376. I've put those 5 lines
in (after line 718) but Firefox 3 still doesn't work and in IE7 I
still get the containment problem (width and height increasing outside
the container) and the line 130 (invalid argument) if you resize left
outside the container.

Could you confirm you see these and reopen?

Nick

On Mar 18, 5:59 pm, Scott González <scott.gonza...@gmail.com> wrote:
> No problem, I forgot the demos were released with 1.6 and couldn't figure
> out how you were getting to the old demos.
>

Scott González

unread,
Mar 25, 2009, 8:08:26 AM3/25/09
to jquery...@googlegroups.com
Hey Nick,

Can you try grabbing the full file instead of just that one commit?  I actually merged in about four or five fixes total so some of those may have been fixed by other commits.

http://jquery-ui.googlecode.com/svn/branches/1.6/ui/ui.resizable.js

NickUK

unread,
Mar 25, 2009, 8:17:16 AM3/25/09
to jQuery UI Development
I've tried http://jquery-ui.googlecode.com/svn/branches/1.6/demos/real-world/image-cropper/index.html
which uses the right file but I still get the same issues mentioned
before. Looks like you have fixed the flipping issue though.

Nick

On Mar 25, 12:08 pm, Scott González <scott.gonza...@gmail.com> wrote:
> Hey Nick,
>
> Can you try grabbing the full file instead of just that one commit?  I
> actually merged in about four or five fixes total so some of those may have
> been fixed by other commits.
>
> http://jquery-ui.googlecode.com/svn/branches/1.6/ui/ui.resizable.js
>

Scott González

unread,
Mar 25, 2009, 9:11:03 AM3/25/09
to jquery...@googlegroups.com
Yeah, I see the problems in Firefox.  This was working for me locally last night.  Unfortunately I deleted the code as soon as I committed.  I'm doing a checkout right now to look into it again.

NickUK

unread,
Apr 3, 2009, 4:44:28 PM4/3/09
to jQuery UI Development
Hi Scott,
I've been doing some comparisons between 1.5 (r238) and 1.6rc2 (r711)
and found 2 lines which might be related to the containment problem.

- this.element.triggerHandler(n == "resize" ? n : ["resize", n].join
(""), [e, this.ui()], this.options[n]);
+ if (n != "resize") this.element.triggerHandler(["resize", n].join
(""), [e, this.ui()], this.options[n]);

+ // calling the user callback at the end
+ this.element.triggerHandler("resize", [e, this.ui()], this.options
["resize"]);

Reverting these 2 lines makes Firefox 3 to respect the containment.
I'm going to do some testing in Windows on IE and Firefox.

Nick

On Mar 25, 2:11 pm, Scott González <scott.gonza...@gmail.com> wrote:
> Yeah, I see the problems in Firefox.  This was working for me locally last
> night.  Unfortunately I deleted the code as soon as I committed.  I'm doing
> a checkout right now to look into it again.
>
> On Wed, Mar 25, 2009 at 8:17 AM, NickUK <nicklev...@gmail.com> wrote:
>
> > I've tried
> >http://jquery-ui.googlecode.com/svn/branches/1.6/demos/real-world/ima...

Scott González

unread,
Apr 3, 2009, 4:46:21 PM4/3/09
to jquery...@googlegroups.com
Thanks Nick,

Any more info you can provide would be greatly appreciated.

NickUK

unread,
Apr 3, 2009, 5:12:00 PM4/3/09
to jQuery UI Development
I found those 2 lines in 1.6rc2.6 and reverted them (line 514 and 343)
and the containment bug seems to be solved in IE7 and Firefox 3. It
also seems to solve the line 130 error in IE7 I mentioned earlier. I
haven't got Firefox 2 installed at home.

What did those 2 lines do especially the second one?
Now the only issue I see is, if you resize to the top or left outside
the container the resizeme_containment_wrap_image will encroach on the
resizeme_containment_div by the distance dragged outside and also
offset the image too.

I hope that makes sense?

Nick

On Apr 3, 9:46 pm, Scott González <scott.gonza...@gmail.com> wrote:
> Thanks Nick,
>
> Any more info you can provide would be greatly appreciated.
>
> On Fri, Apr 3, 2009 at 4:44 PM, NickUK <nicklev...@gmail.com> wrote:
>
> > Hi Scott,

NickUK

unread,
Apr 3, 2009, 5:37:03 PM4/3/09
to jQuery UI Development
Looks like it was this ticket that introduced those 2 lines that I
have reverted - http://dev.jqueryui.com/changeset/339.

Nick

NickUK

unread,
Apr 6, 2009, 3:28:57 AM4/6/09
to jQuery UI Development
Hmm it seems that I still see the Firefox 3 100x100 problem here at
work. I have no idea how it was working at home...

Can you confirm anything I have found Scott?

Nick

On Apr 3, 10:12 pm, NickUK <nicklev...@gmail.com> wrote:

Scott González

unread,
Apr 7, 2009, 9:19:42 PM4/7/09
to jquery...@googlegroups.com
Hey Nick,

Those are the lines that trigger the events for the callbacks.  The events and callbacks were split for some reason that I don't understand, but I believe they have been merged in trunk.  We can't really delete those lines since they'll remove the events, which are part of our API.

Unfortunately there seem to be so many bugs that I'm having trouble tracking this down.  I'd rather not spend much more time on this since it's for a legacy release, I'd rather put effort toward refactoring the plugin for a future release.

Andrew Powell

unread,
Apr 12, 2009, 5:18:10 PM4/12/09
to jQuery UI Development
I had another look at the issues with this demo today. My findings
follow;

I've uploaded a refactor of the demo here; http://shellscape.org/files/jquery-ui/image-cropper.zip

- IE7 and Firefox (3.0.7) issue present when initial cropping box is
moved to the upper right, and lower left throbber is used to resize
the box. The issue basically comprises of a background-position being
set to a negative value that is actually 'outside the viewport' of the
cropping box. Part of the issue consisted of resizable reporting a
left/top position less than zero; when multiplied by -1, resulted in
an erroneous background position. This results in portions of the
right side of the cropping box to display a transparent bg color, thus
showing the semi-trans image below. However, this is corrected by the
'stop' event on resizable, when the mouse button is depressed.

- IE7 and Firefox issue was present whereby the height/width/top/left
'log elements' were reporting values less than, and greater than the
size/position of the actual image.

- IE7 and Firefox issue was present when resizing the cropping box in
any position; The image offset was off by one pixel.

- IE7 issue was present, in the form of a script error - 'invalid
parameter', when resizing from right to left. This seems to be
resolved by checking the left and top values as evident in the demo
zip referenced.

- The resizable plugin also seems to be lagging on the firing of event
handlers when dragging a corner and moving the mouse around
erratically. Could be due to the older version of jQuery, but that's
speculative. Tests on the 1.7 branch don't produce the same delay
issues.

It would seem the main issue here is the position reporting in
resizable. Again, this isn't something I was able to reproduce with
1.7. I wasn't able to reproduce any of the original issues reported
with this in IE7, with the exception of the script error, or
'Firefox' (though a version wasn't originally specified). Both
browsers seem perform the same and exhibit the same behavior now.

With exception to some small position reporting problems in resizable,
this demo is pretty much functional. I'll leave it up to the other
team members to comment on how much further we should get into the
issue, and how much more effort should be spent on it. I hope that
helps the folks out who have been awaiting some news on this.

Thanks,
Andrew

On Apr 7, 8:19 pm, Scott González <scott.gonza...@gmail.com> wrote:
> Hey Nick,
>
> Those are the lines that trigger the events for the callbacks.  The events
> and callbacks were split for some reason that I don't understand, but I
> believe they have been merged in trunk.  We can't really delete those lines
> since they'll remove the events, which are part of our API.
>
> Unfortunately there seem to be so many bugs that I'm having trouble tracking
> this down.  I'd rather not spend much more time on this since it's for a
> legacy release, I'd rather put effort toward refactoring the plugin for a
> future release.
>

Scott González

unread,
Apr 12, 2009, 5:50:33 PM4/12/09
to jquery...@googlegroups.com
Thanks Andrew.  I've committed your patch with a minor fix.  There were two spots where you were checking if the left or top were negative and setting them to zero if they were.  In both places, you were checking the left value when setting the top.

Andrew Powell

unread,
Apr 12, 2009, 5:52:38 PM4/12/09
to jQuery UI Development
I blame the large Easter lunch had this afternoon :)

Thanks for the catch.

On Apr 12, 4:50 pm, Scott González <scott.gonza...@gmail.com> wrote:
> Thanks Andrew.  I've committed your patch with a minor fix.  There were two
> spots where you were checking if the left or top were negative and setting
> them to zero if they were.  In both places, you were checking the left value
> when setting the top.
>

NickUK

unread,
Apr 13, 2009, 8:13:35 AM4/13/09
to jQuery UI Development
Thanks Scott and Andrew for looking into this, much appreciated.

I'm looking at http://jquery-ui.googlecode.com/svn/branches/1.6/demos/real-world/image-cropper/index.html.

In IE8 you just get the 100x100 crop but in IE7 mode it works apart
from resizing right to left (or diagonally up from right to left) and
the "log elements" continuing to increase when outside the container.
In Firefox 3.0.8 it doesn't look like the CSS or jQuery is running -
it's just a plain HTML page.

Nick
> > > > > > > > > > > > > > > - Show quoted text -- Hide quoted text -

Andrew Powell

unread,
Apr 13, 2009, 8:25:59 AM4/13/09
to jquery...@googlegroups.com
Nick,

I don't have any of the issues you've responded with using the demo at
that url. However, I don't think the patch was correct, as I'm having
issues with the demo in the 1.6 branch that I'm not seeing with the
zip archived version I posted yesterday.

- IE7/8, FF 3.0.8 - Dragging the cropping box to the right, and then
using the left or bottom left throbber to resize the box to the far
left (0, y) position, there is a large empty area within the cropping
box.

This behavior is not present in my local refactor of the demo. I'm
uploading the archive again, this time with the top/left fix that
Scott pointed out yesterday.

Nick, I recommend that you try out the contents of the archive until
we can get the main branch updated properly.
http://shellscape.org/files/jquery-ui/image-cropper.zip. With the
refactory, I'm unable to reproduce any of the erroneous behavior you
have described throughout the conversation on the ticket in trac, or
in the convo here in the jquery-ui-dev group.

Others, please get involved and help confirm.

Andrew Powell

unread,
Apr 13, 2009, 8:29:16 AM4/13/09
to jquery...@googlegroups.com
Gah! I just went back to the demo to look at the script again and sure
enough, css and script don't appear to be loading. Silly cache. I'll
forward this on to have it looked at. In the mean time, check out the
archive link posted.

Richard D. Worth

unread,
Apr 13, 2009, 8:37:13 AM4/13/09
to jquery...@googlegroups.com
The new css and js files needed the svn mime-type property set. I just fixed it and verified that it matches the archive you posted.

- Richard

NickUK

unread,
Apr 13, 2009, 8:37:56 AM4/13/09
to jQuery UI Development
I've downloaded your zip and tried that and it displays correctly in
both IE8 and Firefox 3.0.8. However I still see the "log elements"
increasing if you resize outside the container to the left or top. I'm
using a fresh 1.6rc2.6 install.

I have no idea how we are seeing different issues here!

On Apr 13, 1:25 pm, Andrew Powell <powe...@gmail.com> wrote:
> Nick,
>
> I don't have any of the issues you've responded with using the demo at
> that url. However, I don't think the patch was correct, as I'm having
> issues with the demo in the 1.6 branch that I'm not seeing with the
> zip archived version I posted yesterday.
>
> - IE7/8, FF 3.0.8 - Dragging the cropping box to the right, and then
> using the left or bottom left throbber to resize the box to the far
> left (0, y) position, there is a large empty area within the cropping
> box.
>
> This behavior is not present in my local refactor of the demo. I'm
> uploading the archive again, this time with the top/left fix that
> Scott pointed out yesterday.
>
> Nick, I recommend that you try out the contents of the archive until
> we can get the main branch updated properly.http://shellscape.org/files/jquery-ui/image-cropper.zip. With the
> refactory, I'm unable to reproduce any of the erroneous behavior you
> have described throughout the conversation on the ticket in trac, or
> in the convo here in the jquery-ui-dev group.
>
> Others, please get involved and help confirm.
>
>
>
> On Mon, Apr 13, 2009 at 7:13 AM, NickUK <nicklev...@gmail.com> wrote:
>
> > Thanks Scott and Andrew for looking into this, much appreciated.
>
> > I'm looking athttp://jquery-ui.googlecode.com/svn/branches/1.6/demos/real-world/ima....
> ...
>
> read more »- Hide quoted text -

Andrew Powell

unread,
Apr 13, 2009, 8:42:42 AM4/13/09
to jquery...@googlegroups.com
Thanks Richard.

@Nick - No clue my friend. I've tested IE7, 8 and Firefox 3.0.8 (just
updated this morning). The log width/height element values never
exceed the maximum dimensions of the image. At least, I cannot get
them to using any scenario you've posted about.

Eric Pascarello

unread,
Apr 13, 2009, 8:43:50 AM4/13/09
to jquery...@googlegroups.com
Is one of you running in IE7 compatibility mode in IE8?

Eric

Andrew Powell

unread,
Apr 13, 2009, 9:00:02 AM4/13/09
to jquery...@googlegroups.com
I have IE7 available (mostly due to work) in the following 'packages',
however I typically only test IE7 issues with the standalone.

- Standalone
- IE8 - IE7 Compatibility Mode
- IE8 - DebugBar w/ IETester IE7

NickUK

unread,
Apr 13, 2009, 9:23:58 AM4/13/09
to jQuery UI Development
@Eric I use IE8/IE7 compatibility mode in IE8.

How about:
imageSize = $('#_Container').data("image-size"),
top = self.position.top > 0 ? self.position.top : 0,
height = ((top + self.size.height) <= imageSize.height ?
self.size.height : imageSize.height),
left = self.position.left > 0 ? self.position.left : 0,
width = ((left + self.size.width) <= imageSize.width ?
self.size.width : imageSize.width);

And then taking out:
left = left > 0 ? left : 0;
top = top > 0 ? top : 0;

That seems to cure the left/top width and height "log elements"
increasing?
Message has been deleted

NickUK

unread,
Apr 13, 2009, 9:35:30 AM4/13/09
to jQuery UI Development
Actually I've found a new problem (not related to my suggestion) where
if you drag the 100x100
crop to the bottom right and try and resize diagonally down to the
right the "log elements" will say 512px by 384px which is wrong
obviously as it's still 100x100.
> > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages