Closed Bug 393451 Opened 15 years ago Closed 14 years ago
Bounding Client Rects with submenus
1.10 KB, application/vnd.mozilla.xul+xml
3.35 KB, application/vnd.mozilla.xul+xml
7.46 KB, patch
|Details | Diff | Splinter Review|
getBoundingClientRects on a popup returns a rectangle of the popup relative to the document origin, yet a submenu returns incorrect values. In this testcase: 1. Click the button to open a menu 2. Open the submenu for item 'Three' 3. Close the menus. The positions of the menus will appear below the button. The outer values look ok, but the values for the inner menu are odd. The 'top' value looks correct, but 'left' has the same value as the parent menu even though it appears to the right. Also, the 'right' and 'bottom' are the same as 'left' and 'top' making it appear as if the popup has a zero size.
also see the subinner top here, when the menu goes out of screen and is bounced up... it is totally wrong, this makes comparation of menu items with event.clientY a pain
+ for (;refFrame && !refFrame->IsFrameOfType(nsIFrame::eSVGForeignObject); + refFrame = refFrame->GetParent()); How about stopping when !refFrame->GetParent()? Then you don't need the call to GetRootFrame. Why do we need to change the boxObject here? I'd rather leave it alone for compatibility and encourage XUL users to use getBoundingClientRect instead.
https://bugzilla.mozilla.org/attachment.cgi?id=295931 was checked in at 2008-01-10 07:48, right? So this bug can be marked fixed then?
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.