MCPcopy Create free account
hub / github.com/reactjs/react-rails / getSelectionInformation

Function getSelectionInformation

lib/assets/react-source/development/react.js:10666–10674  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10664 return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
10665 }
10666 function getSelectionInformation() {
10667 var focusedElem = getActiveElementDeep();
10668 return {
10669 // Used by Flare
10670 activeElementDetached: null,
10671 focusedElem: focusedElem,
10672 selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
10673 };
10674 }
10675 /**
10676 * @restoreSelection: If any selection information was potentially lost,
10677 * restore it. This is useful when performing operations that could remove dom

Callers 1

prepareForCommitFunction · 0.85

Calls 3

getActiveElementDeepFunction · 0.85
hasSelectionCapabilitiesFunction · 0.85
getSelectionFunction · 0.85

Tested by

no test coverage detected