Closed Bug 36676 Opened 25 years ago Closed 24 years ago

[EVENTTARG] hidden comboboxes still get events

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: Stensrud.Axel, Assigned: dbaron)

References

()

Details

(Whiteboard: [fix in hand])

Attachments

(1 file)

Build: M15, 2000041805 The options of the select/dropdown box on the second "layer" is not shown. Not when selected and not when "layer" shows up.
wierd, I will have to take a deeper look at this.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
The combobox in the hidden div is getting the click events and since they are on top of each other it appears as if the visible one is getting the events and isn't being set correctly. This is either a joki bug or a dup of a joki bug.
Summary: [DIV] missing visibility of SELECT in second "layer" → [DUP] hidden divs still get events
This might be related to Bug 35971
Assignee: rods → joki
Status: ASSIGNED → NEW
Summary: [DUP] hidden divs still get events → hidden divs still get events
Summary: hidden divs still get events → [EVENTTARG] hidden divs still get events
Status: NEW → ASSIGNED
Blocks: 23478
Taking this bug, since I have a fix (building right now...).
Assignee: joki → dbaron
Status: ASSIGNED → NEW
Summary: [EVENTTARG] hidden divs still get events → [EVENTTARG] hidden comboboxes still get events
Status: NEW → ASSIGNED
Attached patch proposed fix (deleted) — Splinter Review
Rod, could you review this fix (for the nsbeta3 timeframe, I guess)? It just makes the nsComboboxControlFrame return itself if: 1) the point is within its bounds 2) it is visible 3) it is the FOREGROUND layer We used to do it in two parts, but the disabled and enabled parts were the same, except we didn't check (2) or (3) in the latter. It's simpler now, and right. The code as a whole (since the diff is confusing) is this: nsComboboxControlFrame::GetFrameForPoint(nsIPresContext* aPresContext, const nsPoint& aPoint, nsFramePaintLayer aWhichLayer, nsIFrame** aFrame) { // The button is getting the hover events so... // None of the children frames of the combobox get // the events. (like the button frame), that way // all event based style rules affect the combobox // and not the any of the child frames. (The inability // of the parent to be in the :hover state at the same // time as its children is really a bug (#5693 / #33736) // in the implementation of :hover.) // It would be theoretically more elegant to check the // children when not disabled, and then use event // capturing. It would correctly handle situations (obscure!!) // where the children were visible but the parent was not. // Now the functionality of the OPTIONs depends on the SELECT // being visible. Oh well... if ( mRect.Contains(aPoint) && (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) ) { const nsStyleDisplay* disp = (const nsStyleDisplay*) mStyleContext->GetStyleData(eStyleStruct_Display); if (disp->IsVisible()) { *aFrame = this; return NS_OK; } } return NS_ERROR_FAILURE; }
Keywords: nsbeta3
Whiteboard: [fix in hand]
Keywords: review
Yes, the fix looks good.
Keywords: reviewapproval
Target Milestone: --- → M18
a=waterson. thanks, dbaron.
Fix checked in, 2000-08-06 12:24 PDT.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updating QA contact.
QA Contact: ckritzer → bsharma
Build: 2000092711 MN6 Platform: WinNT
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: