MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / focusNode

Function focusNode

examples/simple/react.js:18019–18026  ·  view source on GitHub ↗

* @param {DOMElement} node input/textarea to focus

(node)

Source from the content-addressed store, hash-verified

18017 * @param {DOMElement} node input/textarea to focus
18018 */
18019function focusNode(node) {
18020 // IE8 can throw "Can't move focus to the control because it is invisible,
18021 // not enabled, or of a type that does not accept the focus." for all kinds of
18022 // reasons that are too expensive and fragile to test.
18023 try {
18024 node.focus();
18025 } catch (e) {}
18026}
18027
18028module.exports = focusNode;
18029},{}],138:[function(_dereq_,module,exports){

Callers 1

react.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected