Closed Bug 76616 Opened 25 years ago Closed 2 years ago

Nested <BUTTON> problems

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P5)

x86
All
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: vladimire, Unassigned)

Details

Attachments

(2 files)

I understand that there arent that many application of nested buttons, but still they should at least handle the following problems more gracefuly: 1) When you have nested buttons the behaviour is completely unexpected. The inside buttons are not rendered, but their lables are. You can see the top level button, and you can see the labels for the buttons inside of it, but you cannot see the outline, or any indication that they are also buttons. (dont know if that made sence, see the 1st attachment for illustration) When you click the buttons not surprizingly only the top one gets clicked. 2) However when buttons are generated dynamicly from DOM you can see the nesting of the buttons, one inside the other, but when you click the middle button, still only te tomost event handler gets called. To reproduce: 1. Open the second attachment. 2. Put button in the tag field 3. Put some reasonable number in the depth field 4. Click "Generate Test" 5. Click on the generated button... observe the described behaviour
Attached file Testcase #1 - HTML —
Attached file TestCase #2 - DOM —
I'm definitely seeing this in 20010508 Win98. Behavior is still exactly as described. Would confirm if I had privs.
The HTML case is (again, as with the <hn> case) because the parser is correctly dropping the inner buttons on the floor (it's invalid markup). I'm not sure what our behaviour _should_ be for the nested case -- it depends on what the capture, bubbling, and default behaviours are supposed to be.
Assignee: clayton → joki
Component: HTML Element → Event Handling
QA Contact: bsharma → gerardok
I agree with hixie on the first case. It invalid and shouldn't work. Looking at IE5 they create buttons but don't nest them. We just drop the tags. But either way it invalid. As far as test case two it's the way we target the mouse events that causes this. You'll notice you can tab through the nested buttons, but you can't click on them. I'm not sure what the correct behavior is here but it's not something that's serious enough for me to squeeze into the current release.
Target Milestone: --- → Future
QA contact updated
QA Contact: gerardok → madhur
QA Contact: madhur → rakeshmishra
QA Contact: rakeshmishra → vladimire
to default owner
Assignee: joki → saari
Priority: -- → P5
Assignee: saari → nobody
QA Contact: vladimire → events
Component: Event Handling → User events and focus handling
Severity: normal → S3
Duplicate of this bug: 1863202
No longer duplicate of this bug: 1863202

I got the expected behaviors from the TestCase #2 - DOM. Gecko (Fx 125, Win11) and Chrome behave the same.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: