Fix triple click breaking inputs (#5588)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-06-30 08:26:08 -04:00
1 parent 27adab8d1c
commit 165bf57380
1 file changed
+2 -1
+2 -1
View File
@@ -107,8 +107,9 @@ class NonInjectedDrawer extends React.Component<DrawerProps & Dependencies & typ
// detail: A count of consecutive clicks that happened in a short amount of time
if (ev.detail === 3) {
const selection = window.getSelection();
const isSelectingChildrenOfInputLabel = selection?.anchorNode instanceof HTMLLabelElement;
if (selection?.anchorNode?.parentNode) {
if (selection?.anchorNode?.parentNode && !isSelectingChildrenOfInputLabel) {
selection.selectAllChildren(selection.anchorNode.parentNode);
}
}