MCPcopy Create free account
hub / github.com/angular/components / _preventBubblingFromLabel

Method _preventBubblingFromLabel

src/material/checkbox/checkbox.ts:533–537  ·  view source on GitHub ↗

* Prevent click events that come from the ` ` element from bubbling. This prevents the * click handler on the host from triggering twice when clicking on the ` ` element. After * the click event on the ` ` propagates, the browsers dispatches click on the associated *

(event: MouseEvent)

Source from the content-addressed store, hash-verified

531 * bubbles when the label is clicked.
532 */
533 _preventBubblingFromLabel(event: MouseEvent) {
534 if (event.target && this._inputElement && event.target !== this._inputElement.nativeElement) {
535 event.stopPropagation();
536 }
537 }
538}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected