From 273a35d42feeb00f08488d4124bd4831ae8b9f67 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Fri, 12 Jan 2024 15:03:09 +0530 Subject: [PATCH] fix:resolved on-drag placeholder user-details popup open in edit template flow --- .../SignDocuments/src/Component/TemplatePlaceholder.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js b/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js index 5e078ac45..8150149de 100644 --- a/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js +++ b/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js @@ -158,6 +158,7 @@ const TemplatePlaceholder = () => { const [signKey, setSignKey] = useState(); const [IsReceipent, setIsReceipent] = useState(true); const [isDontShow, setIsDontShow] = useState(false); + const [isDragging, setIsDragging] = useState(false); const senderUser = localStorage.getItem( `Parse/${localStorage.getItem("parseAppId")}/currentUser` @@ -473,11 +474,12 @@ const TemplatePlaceholder = () => { //function for save x and y position and show signature tab on that position const handleTabDrag = (key) => { setDragKey(key); + setIsDragging(true); }; //function for set and update x and y postion after drag and drop signature tab const handleStop = (event, dragElement, signerId, key) => { - if (!isResize) { + if (!isResize && isDragging) { const dataNewPlace = addZIndex(signerPos, key, setZIndex); let updateSignPos = [...signerPos]; updateSignPos.splice(0, updateSignPos.length, ...dataNewPlace); @@ -537,6 +539,9 @@ const TemplatePlaceholder = () => { } } setIsMailSend(false); + setTimeout(() => { + setIsDragging(false); + }, 200); }; //function for delete signature block @@ -1132,6 +1137,7 @@ const TemplatePlaceholder = () => { setIsPageCopy={setIsPageCopy} setSignKey={setSignKey} setSignerObjId={setSignerObjId} + isDragging={isDragging} /> )}