Bug 146950

Summary: Choosing from a select element within a <label> field causes checkbox to be checked
Product: WebKit Reporter: Greg Scown <greg>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, akeerthi, ap, cdumez, jonlee, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.10   
Attachments:
Description Flags
HTML which demonstrates this WebKit / label element bug none

Description Greg Scown 2015-07-14 16:55:04 PDT
Created attachment 256810 [details]
HTML which demonstrates this WebKit / label element bug

To reproduce, open the attached webkit_label_bug.html file in the Safari nightly build (r186801).

Select from the popup. Note the checkbox state. Repeat 2-3 times.

Expected Behavior:
Selecting from popup has no impact on checkbox.

Actual Behavior:
Selecting from popup toggles the checkbox.

Here's the HTML in case there's any issue with the attachment:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form action="#">
<label><input type="checkbox" name="Checkbox" id="3" />Popup <select name="popup_3"><option selected="selected">One</option><option>Two</option><option>Three</option><option>Four</option><option>Five</option></select></label>
</form>
</body>
</html>
Comment 1 Alexey Proskuryakov 2015-07-17 13:25:03 PDT
Reproduces in Safari/WebKit 8.0.7 too.

In Firefox, the checkbox visibly activates when clicking on the select, but it doesn't change the state.
Comment 2 Ahmad Saleem 2023-05-25 14:41:13 PDT
I tried to reproduce this in Safari 16.5 and it does not reproduce, it just activates 'checkbox' when I open menu for selection and it is similar in Firefox Nightly 115. While Chrome Canary 115 does not do anything.

CCing - Aditya for any input.