Skip to content

Commit 273a35d

Browse files
fix:resolved on-drag placeholder user-details popup open in edit template flow
1 parent 2f195fe commit 273a35d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ const TemplatePlaceholder = () => {
158158
const [signKey, setSignKey] = useState();
159159
const [IsReceipent, setIsReceipent] = useState(true);
160160
const [isDontShow, setIsDontShow] = useState(false);
161+
const [isDragging, setIsDragging] = useState(false);
161162
const senderUser =
162163
localStorage.getItem(
163164
`Parse/${localStorage.getItem("parseAppId")}/currentUser`
@@ -473,11 +474,12 @@ const TemplatePlaceholder = () => {
473474
//function for save x and y position and show signature tab on that position
474475
const handleTabDrag = (key) => {
475476
setDragKey(key);
477+
setIsDragging(true);
476478
};
477479

478480
//function for set and update x and y postion after drag and drop signature tab
479481
const handleStop = (event, dragElement, signerId, key) => {
480-
if (!isResize) {
482+
if (!isResize && isDragging) {
481483
const dataNewPlace = addZIndex(signerPos, key, setZIndex);
482484
let updateSignPos = [...signerPos];
483485
updateSignPos.splice(0, updateSignPos.length, ...dataNewPlace);
@@ -537,6 +539,9 @@ const TemplatePlaceholder = () => {
537539
}
538540
}
539541
setIsMailSend(false);
542+
setTimeout(() => {
543+
setIsDragging(false);
544+
}, 200);
540545
};
541546

542547
//function for delete signature block
@@ -1132,6 +1137,7 @@ const TemplatePlaceholder = () => {
11321137
setIsPageCopy={setIsPageCopy}
11331138
setSignKey={setSignKey}
11341139
setSignerObjId={setSignerObjId}
1140+
isDragging={isDragging}
11351141
/>
11361142
)}
11371143
</div>

0 commit comments

Comments
 (0)