Skip to content

Commit

Permalink
Merge pull request #490 from OpenSignLabs/feat_label
Browse files Browse the repository at this point in the history
fix: date is not changable in signyourself flow of mobile
  • Loading branch information
prafull-opensignlabs authored Mar 14, 2024
2 parents 39806e3 + db9ae71 commit 08476ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions apps/OpenSign/src/components/pdf/Placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,21 @@ function Placeholder(props) {

return () => clearTimeout(timer);
}, [props.pos]);

useEffect(() => {
const closeMenuOnOutsideClick = (e) => {
if (!isDraggingEnabled && !e.target.closest("#changeIsDragging")) {
setDraggingEnabled(true);
}
};

document.addEventListener("click", closeMenuOnOutsideClick);

return () => {
// Cleanup the event listener when the component unmounts
document.removeEventListener("click", closeMenuOnOutsideClick);
};
}, [isDraggingEnabled]);
//function change format array list with selected date and format
const changeDateFormat = () => {
const updateDate = [];
Expand Down
3 changes: 2 additions & 1 deletion apps/OpenSign/src/components/pdf/PlaceholderBorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { themeColor } from "../../constant/const";
import {
defaultWidthHeight,
isMobile,
radioButtonWidget,
resizeBorderExtraWidth
} from "../../constant/Utils";
Expand Down Expand Up @@ -30,7 +31,7 @@ function PlaceholderBorder(props) {
};
return (
<div
onMouseEnter={props?.setDraggingEnabled(true)}
onMouseEnter={!isMobile && props?.setDraggingEnabled(true)}
className="borderResize"
style={{
borderColor: themeColor,
Expand Down

0 comments on commit 08476ba

Please sign in to comment.