We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3998eb commit 174375cCopy full SHA for 174375c
1 file changed
packages/react-dom/src/client/ReactInputSelection.js
@@ -45,8 +45,8 @@ function getElementsWithSelections(acc, win) {
45
return acc;
46
}
47
let element = getActiveElement(doc);
48
- // Use getSelection if no activeElement with selection capabilities
49
- if (!hasSelectionCapabilities(element)) {
+ // Use getSelection if activeElement is the document body
+ if (element === doc.body) {
50
if (win.getSelection) {
51
const selection = win.getSelection();
52
if (selection) {
0 commit comments