From cb39d77667610030afa58f3befcf3097ec6c94b2 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Mon, 11 Dec 2023 21:32:09 -0300 Subject: [PATCH] fix(EditFlowSettingsComponent): add handleFocus function to fix double-click text selection issue in input fields --- .../src/components/EditFlowSettingsComponent/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx index 84814c7b7..0e927f24f 100644 --- a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx @@ -29,6 +29,9 @@ export const EditFlowSettings: React.FC = ({ setDescription!(event.target.value); }; + //this function is necessary to select the text when double clicking, this was not working with the onFocus event + const handleFocus = (event) => event.target.select(); + return ( <>