MCPcopy Create free account
hub / github.com/microsoft/SandDance / getSelectionInformation

Function getSelectionInformation

docs/external/js/react-dom.development.js:7094–7102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7092 return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
7093 }
7094 function getSelectionInformation() {
7095 var focusedElem = getActiveElementDeep();
7096 return {
7097 // Used by Flare
7098 activeElementDetached: null,
7099 focusedElem: focusedElem,
7100 selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
7101 };
7102 }
7103 /**
7104 * @restoreSelection: If any selection information was potentially lost,
7105 * 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