Open Bug 161477 Opened 22 years ago Updated 2 years ago

Tree selection in wrong position when tree nested inside more than 1 scrollable view

Categories

(Core :: XUL, defect)

All
Windows 2000
defect

Tracking

()

People

(Reporter: mark.kobine, Unassigned)

Details

(Keywords: embed, testcase, Whiteboard: has patch)

Attachments

(3 files, 1 obsolete file)

When you have a XUL tree nested inside more than 1 scrollable view the row selection in the tree can go wrong. If any of the outer views are scrolled and you then try to select a row in the tree you will end up selecting a row other than the one you wanted. This is due to the layout code not taking into account the offsets of the outer, enclosing, views. Also see 147806 for a similar issue with XUL pop-ups.
This seems like a recuring issue in multiple places, which we've hit (twice so far) becuase we have nested scroll views. Could this logic not be pushed out of the various components and into the view manager, which could handle walking up the view heirarchy resolving for scroll offset (and any other position changes)? I.e a GetCombinedOffset on nsIView or similar.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch Bug fix for 161477 (obsolete) (deleted) — Splinter Review
taking
Assignee: hewitt → varga
could you attach a test case please ?
Attached file Test case XUL (deleted) —
The first box can be scrolled and rows in the tree selected quite happily. In the second box, however, row selection breaks down if the outer box is scrolled. If the outer box is not scrolled tree selection works fine - even if the inner box is scrolled. What appears to be happening is that the offset of the outer scroll has not been taken into account when calculating the selection point in the tree. This file requires test.css.
Attached file CSS file to accompany test.xul (deleted) —
column picker is wrong positioned too cc'ing roc
Any chance of getting this in? (See comments in #147806 too..)
Attachment #94323 - Attachment is obsolete: true
Keywords: embed, testcase
Comment on attachment 107013 [details] [diff] [review] Updated version of the patch that applies against the trunk It looks good. I assume you didn't notice any regressions. r=varga
You need to go up only to the root view for this document. If you just check against null, you may find yourself going up into parent documents if your XUL is in an IFRAME or something. See nsMenuPopupFrame::GetViewOffset for code that does this. Other than that, looks OK.
No discussion for THREE YEARS, but the bug persists.
QA Contact: shrir → xptoolkit.trees
I think I triggered a similar (or the same) bug w/ a scrollable tabpanel. Should I report a new bug or just post details under this bug?
never checked in?
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.trees → xptoolkit.widgets
Assignee: Jan.Varga → nobody
Whiteboard: has patch
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: