File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
apps/OpenSign/src/components/pdf Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,21 @@ function Placeholder(props) {
144
144
145
145
return ( ) => clearTimeout ( timer ) ;
146
146
} , [ props . pos ] ) ;
147
+
148
+ useEffect ( ( ) => {
149
+ const closeMenuOnOutsideClick = ( e ) => {
150
+ if ( ! isDraggingEnabled && ! e . target . closest ( "#changeIsDragging" ) ) {
151
+ setDraggingEnabled ( true ) ;
152
+ }
153
+ } ;
154
+
155
+ document . addEventListener ( "click" , closeMenuOnOutsideClick ) ;
156
+
157
+ return ( ) => {
158
+ // Cleanup the event listener when the component unmounts
159
+ document . removeEventListener ( "click" , closeMenuOnOutsideClick ) ;
160
+ } ;
161
+ } , [ isDraggingEnabled ] ) ;
147
162
//function change format array list with selected date and format
148
163
const changeDateFormat = ( ) => {
149
164
const updateDate = [ ] ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from "react";
2
2
import { themeColor } from "../../constant/const" ;
3
3
import {
4
4
defaultWidthHeight ,
5
+ isMobile ,
5
6
radioButtonWidget ,
6
7
resizeBorderExtraWidth
7
8
} from "../../constant/Utils" ;
@@ -30,7 +31,7 @@ function PlaceholderBorder(props) {
30
31
} ;
31
32
return (
32
33
< div
33
- onMouseEnter = { props ?. setDraggingEnabled ( true ) }
34
+ onMouseEnter = { ! isMobile && props ?. setDraggingEnabled ( true ) }
34
35
className = "borderResize"
35
36
style = { {
36
37
borderColor : themeColor ,
You can’t perform that action at this time.
0 commit comments