RESOLVED CONFIGURATION CHANGED 197743
document.elementsFromPoint does not return <label> parent of <input>
https://bugs.webkit.org/show_bug.cgi?id=197743
Summary document.elementsFromPoint does not return <label> parent of <input>
Steven
Reported 2019-05-09 11:04:31 PDT
In Safari 12 and Technology Preview, if a `<label>` element wraps an `<input>` element (`<label>Label text<input/></label>`), using `document.elementsFromPoint` with the x and y coordinates set to the `<input>` elements position does not return the parent `<label>`. If instead the `<label>` has a background color, the `<label>` then will be returned. See https://codepen.io/straker/pen/qGbMvJ
Attachments
Radar WebKit Bug Importer
Comment 1 2019-05-12 15:01:08 PDT
Ahmad Saleem
Comment 2 2022-08-11 14:42:52 PDT
Output from all browsers (for broken test case because Comment 0 mentions that "background color" one works): *** Safari 15.6 on macOS 12.5 *** input label#element-a div body html *** Firefox Nightly 105 *** input label#element-a div body html *** Chrome Canary 106 *** input label#element-a div body html _________- Since all browsers are same and showing label value at same place, I am going to mark this "RESOLVED CONFIGURATION CHANGED" because it seems to be something fixed along the way. If I am wrong, please reopen this bug with explanation or updated test case. Thanks!
Note You need to log in before you can comment on or make changes to this bug.