MCPcopy Create free account
hub / github.com/Lobos/react-ui / shouldUseClickEvent

Function shouldUseClickEvent

docs/lib/react.js:1139–1144  ·  view source on GitHub ↗

* SECTION: handle `click` event

(elem)

Source from the content-addressed store, hash-verified

1137 * SECTION: handle `click` event
1138 */
1139function shouldUseClickEvent(elem) {
1140 // Use the `click` event to detect changes to checkbox and radio inputs.
1141 // This approach works across all browsers, whereas `change` does not fire
1142 // until `blur` in IE8.
1143 return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
1144}
1145
1146function getTargetInstForClickEvent(topLevelType, targetInst) {
1147 if (topLevelType === topLevelTypes.topClick) {

Callers 1

react.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…