From a96034fddaf731f2e5b4779cb61fbcba5d4e5403 Mon Sep 17 00:00:00 2001 From: Spyros Ioakeimidis Date: Sat, 7 Apr 2018 23:05:44 +0200 Subject: [PATCH] Add link to HTML spec for element types and selection --- packages/react-dom/src/client/ReactInputSelection.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-dom/src/client/ReactInputSelection.js b/packages/react-dom/src/client/ReactInputSelection.js index 6ee2351b46ff..d4b47b992ce8 100644 --- a/packages/react-dom/src/client/ReactInputSelection.js +++ b/packages/react-dom/src/client/ReactInputSelection.js @@ -22,6 +22,11 @@ function isInDocument(node) { * Input selection module for React. */ +/** + * @hasSelectionCapabilities: we get the element types that support selection + * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` + * and `selectionEnd` rows. + */ export function hasSelectionCapabilities(elem) { const nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); return (