@@ -158,6 +158,7 @@ const TemplatePlaceholder = () => {
158
158
const [ signKey , setSignKey ] = useState ( ) ;
159
159
const [ IsReceipent , setIsReceipent ] = useState ( true ) ;
160
160
const [ isDontShow , setIsDontShow ] = useState ( false ) ;
161
+ const [ isDragging , setIsDragging ] = useState ( false ) ;
161
162
const senderUser =
162
163
localStorage . getItem (
163
164
`Parse/${ localStorage . getItem ( "parseAppId" ) } /currentUser`
@@ -473,11 +474,12 @@ const TemplatePlaceholder = () => {
473
474
//function for save x and y position and show signature tab on that position
474
475
const handleTabDrag = ( key ) => {
475
476
setDragKey ( key ) ;
477
+ setIsDragging ( true ) ;
476
478
} ;
477
479
478
480
//function for set and update x and y postion after drag and drop signature tab
479
481
const handleStop = ( event , dragElement , signerId , key ) => {
480
- if ( ! isResize ) {
482
+ if ( ! isResize && isDragging ) {
481
483
const dataNewPlace = addZIndex ( signerPos , key , setZIndex ) ;
482
484
let updateSignPos = [ ...signerPos ] ;
483
485
updateSignPos . splice ( 0 , updateSignPos . length , ...dataNewPlace ) ;
@@ -537,6 +539,9 @@ const TemplatePlaceholder = () => {
537
539
}
538
540
}
539
541
setIsMailSend ( false ) ;
542
+ setTimeout ( ( ) => {
543
+ setIsDragging ( false ) ;
544
+ } , 200 ) ;
540
545
} ;
541
546
542
547
//function for delete signature block
@@ -1132,6 +1137,7 @@ const TemplatePlaceholder = () => {
1132
1137
setIsPageCopy = { setIsPageCopy }
1133
1138
setSignKey = { setSignKey }
1134
1139
setSignerObjId = { setSignerObjId }
1140
+ isDragging = { isDragging }
1135
1141
/>
1136
1142
) }
1137
1143
</ div >
0 commit comments