Skip to content

Commit c2a45c2

Browse files
fix: widget copy issue in sign-yourself flow
1 parent a629aa0 commit c2a45c2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

apps/OpenSign/src/components/pdf/Placeholder.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,16 @@ function Placeholder(props) {
310310
//when user click on copy icon of text widget in that condition text widget does not have any signerObjId
311311
//in that case i have to save in tempSignerId as a unique id of previous select signer's unique id
312312
//and on save or cancel button of copy all page popup i have set this temp signer Id in unique id
313-
if (props.data && props.pos.type === textWidget) {
313+
314+
if (props.data && props?.pos?.type !== textWidget) {
315+
props.setSignerObjId(props?.data?.signerObjId);
316+
props.setUniqueId(props?.data?.Id);
317+
} else if (props.data && props.pos.type === textWidget) {
314318
props.setTempSignerId(props.uniqueId);
319+
props.setSignerObjId(props?.data?.signerObjId);
320+
props.setUniqueId(props?.data?.Id);
315321
}
316-
props.setSignerObjId(props?.data?.signerObjId);
317-
props.setUniqueId(props?.data?.Id);
322+
318323
//checking widget's type and open widget copy modal for required widgets
319324
if (
320325
["signature", textWidget, "stamp", "initial"].includes(props.pos.type)

0 commit comments

Comments
 (0)