From 9cc9a93c3d29b45187baca249acd3fa61e30cc96 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Wed, 4 Sep 2024 15:13:10 +0530 Subject: [PATCH] fix: handle error --- .../src/components/opensigndrive/DriveBody.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/OpenSign/src/components/opensigndrive/DriveBody.js b/apps/OpenSign/src/components/opensigndrive/DriveBody.js index b0df1a745..1b4e69a2e 100644 --- a/apps/OpenSign/src/components/opensigndrive/DriveBody.js +++ b/apps/OpenSign/src/components/opensigndrive/DriveBody.js @@ -386,7 +386,12 @@ function DriveBody(props) { {rename === data.objectId ? ( inputRef.current.select()} + onFocus={() => { + const input = inputRef.current; + if (input) { + input.select(); + } + }} autoFocus={true} type="text" onBlur={() => handledRenameDoc(data)} @@ -451,7 +456,12 @@ function DriveBody(props) { inputRef.current.select()} + onFocus={() => { + const input = inputRef.current; + if (input) { + input.select(); + } + }} onBlur={() => handledRenameDoc(data)} onKeyDown={(e) => handleEnterPress(e, data)} ref={inputRef}