Closed Bug 293453 Opened 19 years ago Closed 19 years ago

Unable to click link when inside div with overflow:auto and border-top

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: roc)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

See upcoming testcase.
I am unable to click on the top link using current trunk build.
It seems directly related to the border-top-width of the overflow:auto div, as
the second link is partly clickable when the border-top-width is 10px.
The bug also happens with overflow:scroll divs.

It doesn't happen with 2005-04-03 build, it happens with 2005-04-04 build:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-04-03+06%3A00%3A00&maxdate=2005-04-04+09%3A00%3A00&cvsroot=%2Fcvsroot
I very much suspect bug 288117 to be the culprit.
Attached file testcase
Attached patch fixSplinter Review
The problem is that the scrolled frame's mRect is at (0,0) but the event point
(relative to the scrolled frame's parent frame's nearest view) is at 50px +
whatever so nsBlockFrame::GetFrameForPointUsing decides that the event is
outside the frame. Unfortunately fixing this without regressing anything looks
really hard so this patch just hacks around the problem by marking the scrolled
frame as having outside children. Then because the scrolled frame has a view,
it corrects the event to the right coordinates for its children.

This is lame but I can't think of anything better short of fixing all the event
code to use reasonable invariants, and we don't have time to do that for this
release.
Assignee: nobody → roc
Status: NEW → ASSIGNED
Attachment #183119 - Flags: superreview?(bzbarsky)
Attachment #183119 - Flags: review?(bzbarsky)
Comment on attachment 183119 [details] [diff] [review]
fix

r+sr=bzbarsky, but file a bug to remove the hack (dependent on the event coord
bug)?
Attachment #183119 - Flags: superreview?(bzbarsky)
Attachment #183119 - Flags: superreview+
Attachment #183119 - Flags: review?(bzbarsky)
Attachment #183119 - Flags: review+
Comment on attachment 183119 [details] [diff] [review]
fix

fixes event handling regression. takes a safe(r) but hacky approach
Attachment #183119 - Flags: approval1.8b2?
Comment on attachment 183119 [details] [diff] [review]
fix

a=asa
Attachment #183119 - Flags: approval1.8b2? → approval1.8b2+
checked in
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Is there any code that gets confused because there's no overflowAreaProperty
frame property?
I checked the nsFrame code, specially nsFrame::GetOverflowRect, and it looks OK.
appears to have caused Bug 294324
Blocks: 290374
(In reply to comment #3)
> r+sr=bzbarsky, but file a bug to remove the hack (dependent on the event coord
> bug)?

What's the bug number for that?
Well, I forgot to file it. But now it's bug 295941.
Blocks: 296337
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: