MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / trapClickOnNonInteractiveElement

Function trapClickOnNonInteractiveElement

code/redux/public/app.js:16369–16380  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

16367}
16368
16369function trapClickOnNonInteractiveElement(node) {
16370 // Mobile Safari does not fire properly bubble click events on
16371 // non-interactive elements, which means delegated click listeners do not
16372 // fire. The workaround for this bug involves attaching an empty click
16373 // listener on the target node.
16374 // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
16375 // Just set it using the onclick property so that we don't have to manage any
16376 // bookkeeping for it. Not sure if we need to clear it when the listener is
16377 // removed.
16378 // TODO: Only do this for the relevant Safaris maybe?
16379 node.onclick = emptyFunction;
16380}
16381
16382function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
16383 for (var propKey in nextProps) {

Callers 3

setInitialProperties$1Function · 0.70
diffProperties$1Function · 0.70
diffHydratedProperties$1Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected