ui.position stable?

2 views
Skip to first unread message

Andrew Powell

unread,
Sep 15, 2009, 6:14:38 PM9/15/09
to jquery...@googlegroups.com
Hey all,

I'm a little out of touch right now as work has been whoopin' me
something awful. I have the immediate need in a project I'm working on
for ui.position. Is this util stable enough to use straight out of the
trunk? Would naturally include it separately; from what I understand
trunk is the pending 1.8a release.

Please do let me know.

Thanks,
Andrew

Scott González

unread,
Sep 15, 2009, 6:35:29 PM9/15/09
to jquery...@googlegroups.com
Hey Andrew,

Position is stable as of the revision that it landed in trunk.  It is also included in the 1.8a1 release, which came out a few weeks ago.

There will be some changes internally; the .offset() override will be part of jQuery core in its next release (already landed in trunk).  The scope of the changes will be:
- Changing the "by" option to "using"
- Passing the calculated position to the using option, instead of the calculated offset

I've been using the position plugin at work and it's been working great for me.

Andrew Powell

unread,
Sep 15, 2009, 6:37:40 PM9/15/09
to jquery...@googlegroups.com
Thanks for the reply. Much appreciated.

2009/9/15 Scott González <scott.g...@gmail.com>:

Andrew Powell

unread,
Sep 16, 2009, 10:21:00 AM9/16/09
to jquery...@googlegroups.com
Is there a 1.7.2 compatible version out there somewhere? The current
ui.position.js in the trunk is causing an 'a.widget is not defined'
error with the min'd 1.7.2.

Jörn Zaefferer

unread,
Sep 16, 2009, 10:22:39 AM9/16/09
to jquery...@googlegroups.com
ui.position.js doesn't have any dependencies other then jQuery. The
error is likely to be caused by something else.

Jörn

Andrew Powell

unread,
Sep 16, 2009, 10:26:08 AM9/16/09
to jquery...@googlegroups.com
The default download from the jquery ui site, coupled with the
ui.position included from the trunk generates that error. I've
naturally created a separate test file to confirm this.

Jörn Zaefferer

unread,
Sep 16, 2009, 10:35:12 AM9/16/09
to jquery...@googlegroups.com
Can you upload the testpage or put it on jsbin?

Jörn

Andrew Powell

unread,
Sep 16, 2009, 10:37:37 AM9/16/09
to jquery...@googlegroups.com
http://pastie.org/618823

Reproducible on several different machines in our office. Firefox 3.5.3.

Jörn Zaefferer

unread,
Sep 16, 2009, 10:39:59 AM9/16/09
to jquery...@googlegroups.com
ui.core.js overwrites $.ui, instead of checking if it already exists,
while ui.position.js uses it and creates it if necessary. Include
ui.position.js after the other ui stuff, and it should work.

Also please file a ticket for ui.core.js to create $.ui only if it
doesn't exist...

Jörn

Andrew Powell

unread,
Sep 16, 2009, 10:42:55 AM9/16/09
to jquery...@googlegroups.com
Thanks for confirming. I'll file the ticket soonish.

On Wed, Sep 16, 2009 at 10:39 AM, Jörn Zaefferer

Andrew Powell

unread,
Sep 16, 2009, 10:46:16 AM9/16/09
to jquery...@googlegroups.com
Ticket created; http://dev.jqueryui.com/ticket/4860 Please assign it's
priority accordingly.

Scott González

unread,
Sep 16, 2009, 10:47:20 AM9/16/09
to jquery...@googlegroups.com
On Wed, Sep 16, 2009 at 10:39 AM, Jörn Zaefferer <joern.z...@googlemail.com> wrote:

ui.core.js overwrites $.ui, instead of checking if it already exists,
while ui.position.js uses it and creates it if necessary. Include
ui.position.js after the other ui stuff, and it should work.

Also please file a ticket for ui.core.js to create $.ui only if it
doesn't exist...

UI core does check if $.ui exists. The problem isn't that ui.core.js is overwriting $.ui, it's that it's not doing anything at all because $.ui already exists.  This logic was added to fix a bug when UI was loaded multiple for some reason.

Scott González

unread,
Sep 16, 2009, 10:49:49 AM9/16/09
to jquery...@googlegroups.com
On Wed, Sep 16, 2009 at 10:46 AM, Andrew Powell <pow...@gmail.com> wrote:

Ticket created; http://dev.jqueryui.com/ticket/4860 Please assign it's
priority accordingly.

I've closed the ticket.  This is a dependency bug in position.  It shouldn't use the ui namespace, and it won't in the final release.

Andrew Powell

unread,
Sep 16, 2009, 10:52:44 AM9/16/09
to jquery...@googlegroups.com
Thanks for the investigative work. In the mean time, ensuring that
ui.position is included after jquery ui solves the issue.

2009/9/16 Scott González <scott.g...@gmail.com>:

Jörn Zaefferer

unread,
Sep 16, 2009, 11:32:26 AM9/16/09
to jquery...@googlegroups.com
Doh, I looked at an outdated version of ui.core.js. Thanks for clarifying.

Jörn

2009/9/16 Scott González <scott.g...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages