MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / getFocusedChild

Function getFocusedChild

src/Offcanvas.js:256–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254 }
255
256 getFocusedChild() {
257 let currentFocus;
258 const focusableChildren = this.getFocusableChildren();
259
260 try {
261 currentFocus = document.activeElement;
262 } catch (err) {
263 currentFocus = focusableChildren[0];
264 }
265 return currentFocus;
266 }
267
268 trapFocus(ev) {
269 if (!this.props.trapFocus) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…