- From: mbrodesser <notifications@github.com>
- Date: Tue, 09 Apr 2019 06:20:11 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 9 April 2019 13:20:33 UTC
There's a separate [issue](https://github.com/whatwg/html/issues/4516) for adapting the whatwg/html spec. When a label has an associated [labeled control](https://html.spec.whatwg.org/#labeled-control), the [dispatch algorithm](https://dom.spec.whatwg.org/#concept-event-dispatch) should adjust the target to the labeled control. See for instance the first example at https://html.spec.whatwg.org/#the-label-element. It seems this would match the behavior of at least Firefox and Chrome (tested on Windows, Ubuntu and OSX). E.g.: ``` data:text/html,<label id="cb-label">CB <input type="checkbox" id="cb"></label> <script> e = new MouseEvent("click"); document.getElementById("cb-label").dispatchEvent(e); </script> ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/749
Received on Tuesday, 9 April 2019 13:20:33 UTC