This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Sample Ajax auto complete renders incorrectly inside of a page fragment | ||
---|---|---|---|
Product: | obsolete | Reporter: | Lark Fitzgerald <lfitzgerald> |
Component: | visualweb | Assignee: | Matthew Bohm <mbohm> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Lark Fitzgerald
2007-03-27 15:21:13 UTC
comments from Chrys: I debugged this issue down to the fact that the autocomplete text field is in a div. The javascript code that the complete popup window uses to get the x and y display coordinates seems to have a bug. The popup window's position is set relative to its container yet the javascript sets the position relative to the top of the document. This makes the popup display off by the sum of the x and y offsets of all the parent containers. The javascript code is in ui.jar META-INF/autocomplete/script.js this._y = function() { var element = this.target; var y = 0; while (element) { if (element.offsetParent) { y += element.offsetTop; } else if (element.y) { y += element.y; } element = element.offsetParent; } return y; } I changed it to this and it seems to work correctly. this._y = function() { var element = this.target; var y = 0; if (element.offsetParent) { y += element.offsetTop; } else if (element.y) { y += element.y; } return y; } I made the same changes to this._x = function() as well. Chrys Accepting. The proposed fix appears to work. I intend to incorporate it. Fix is available in most recent ui-0.1.2.complib. Verified using AJAX BluePrints 0.1.2 complib. Product Version: NetBeans 6 IDE Dev (Build beta1: 200709250000 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02 Glassfish: 58g Woodstock 4.1: 200709201029 |