Closed Bug 27757 Opened 25 years ago Closed 25 years ago

[EVENTTARG]:hover of inline text with padding has weird effect.

Categories

(Core :: Layout, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED INVALID
mozilla0.9

People

(Reporter: jmraker, Assigned: dbaron)

References

Details

Attachments

(1 file)

On the Win32 2000021408 daily build Actual Results: The span:hover is applied when mouse is not over fields probably because the <span> padding didn't render right. When the span:hover is being used, clicking on the mouse to select text is also off. The <DD> or the <DL> tag seems to make the problem worse. Expected Results: span:hover should be applied when the mouse is over the span text. Also I think it should either render the <span> padding, or ignore it on :hover (because <span> is display:inline).
Attached file test case of odd hover
Summary: :hover of inline text adding padding has weird effect. → :hover of inline text with padding has weird effect.
Assignee: troy → joki
Tom, looks like an event targeting issue. Padding doesn't affect the line height, but it does apply to inline elements. That means the padding area of inline elements can extend outside of their line and across into adjacent lines However, from an event perspective if the padding of an element that extends outside of its line overlaps the content area of an element in the line below, then the content area of the element in the line below should get the event Kind of yucky
Marking M19. Probably a rare combination?
Target Milestone: M19
I think technically the painting order is wrong here, but considering that the event order should match the painting order, the solution should be to override GetFrameForPoint for nsHTMLContainerFrame (or maybe just nsInlineFrame) the same way it is overridden on nsViewportFrame.
Summary: :hover of inline text with padding has weird effect. → [EVENTTARG]:hover of inline text with padding has weird effect.
The paint order bug as been filed as bug 36710. The correct solution to this bug depends on how that bug is fixed.
Status: NEW → ASSIGNED
Taking this bug, although I'll probably fix bug 36710 instead.
Assignee: joki → dbaron
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Marking INVALID since fix for bug 36710 checked in 2000-09-04 14:45 PDT.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
It seems to work for me but i can't tell because the expected results doesnt make sense to me. Platform: PC OS: Windows 98 Build # 2000100508 M18 Trunk Build Marking as Verified
Status: RESOLVED → VERIFIED
On Win32 2000100820 nightly build (Latest FTP directory): When I hover over the letters so that CCCCC is "hovered" for example, the text above the CCCCC does not show on the screen. But the text below it "D" and EEEEEEEE does show. The padding of 50 pixels is never rendered except in the hover's background color. span {padding: 50px;} span:hover {background-color:red;} The span applies to the first 7 lines of various length text. It's possible that I'm not seeing the fix because of the various branches of mozilla.
Status: VERIFIED → REOPENED
Resolution: INVALID → ---
Target Milestone: M19 → mozilla0.9
Like I said, that's the expected behavior. Marking INVALID again. We paint in document order, and the inline elements' backgrounds are in the same layer as their foregrounds. This is the simplest (i.e., fastest) way to comply with CSS2 section 9.5. Padding should have no effect on the line's height. See the relevant sections of CSS2 (10.8, etc.) or an alternate explanation of the inline box model such as http://www.people.fas.harvard.edu/~dbaron/css/2000/01/dibm
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → INVALID
Marking verified per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: