Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1060 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

Autocompletefield displays incorrectly within relatively positioned blocks

Reported by: PeterRussell Owned by: anonymous
Priority: normal Milestone:
Component: TG Widgets Version: 0.9a6
Severity: minor Keywords: Patch


When an autocompletefield widget is contained within a block that has position:relative CSS attribute, the completion list does not display directly below the entry box.

This can be fixed with the following simple patch:

Index: turbogears/widgets/static/autocompletefield.js =================================================================== --- turbogears/widgets/static/autocompletefield.js (revision 1733) +++ turbogears/widgets/static/autocompletefield.js (working copy) @@ -338,7 +338,7 @@

function getParentOffset(s,offsetType) {

var parentOffset=0;

  • while(s) {

+ while(s && computedStyle(s, 'position') != 'relative') {

parentOffset+=s[offsetType]; s=s.offsetParent




autcomplete.patch Download (493 bytes) - added by PeterRussell 13 years ago.
Patch to fix bug

Change History

comment:1 Changed 13 years ago by alberto

Please attach the patch as a separate file, it's way too tedious to extract it from the summary and apply it cleanly. Thanks :)

Changed 13 years ago by PeterRussell

Patch to fix bug

comment:2 Changed 13 years ago by alberto

  • Status changed from new to closed
  • Resolution set to fixed

Comitted at [1807]. Thanks!

Note: See TracTickets for help on using tickets.