[jifty-devel] Autocompleter and absolute positioning errors

Andrew Hanenkamp sterling at hanenkamp.com
Mon Apr 21 17:58:19 EDT 2008


I'm working on upgrading my app to run on the very latest Jifty since the
jQuery update. Things are going great and I appreciate all the work that has
gone in to make this work well. The one problem I ran into was with the
autocompleter acting odd. I posted this link to the IRC channel earlier to
demonstrate the issue:

http://www.grabup.com/uploads/918c84302ffbfe61eb1ba3a0e5d3450d.png

The problem is that our application uses "position:relative" to fix some
rendering issues with our template in IE6 and IE7. The Interface iAuto
plugin to jQuery, however, does not take this into account while calculating
the values for the "top" and "left" parameters. Thus, the autocompleter is
shifted over and down the same amount as the main content of the page is
shifted over by the border and down by the header.

I have attached a patch that corrects the problem. However, it relies upon
the jquery.dimensions.js plugin (which I have already included in my
application because I also use the ui.accordion.js plugin for jQuery).
Here's a link for the Dimensions plugin:

http://brandonaaron.net/docs/dimensions/

You can find the description for the position() method from the API tab on
that page. I'm posting this to the list in hopes we can come up with a fix
for this that will make everyone happy. In the meantime, I've embedded the
patched iautocomplete.js in my application.

Cheers,
Sterling
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jifty.org/pipermail/jifty-devel/attachments/20080421/d3a0a6aa/attachment.htm 


More information about the jifty-devel mailing list