From 602e23c719a0d583b194d627761efff14fb9b074 Mon Sep 17 00:00:00 2001 From: Stixx Date: Wed, 27 Nov 2024 17:00:59 +0100 Subject: [PATCH] fix: clicking on marked fileds is losing input text/squiggle, squiggle field is mobile friendly --- src/components/MarkFormField/style.module.scss | 2 +- src/components/PDFView/PdfMarking.tsx | 4 ++-- src/utils/const.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/MarkFormField/style.module.scss b/src/components/MarkFormField/style.module.scss index 0125140..686595f 100644 --- a/src/components/MarkFormField/style.module.scss +++ b/src/components/MarkFormField/style.module.scss @@ -122,7 +122,7 @@ align-items: center; grid-gap: 15px; box-shadow: 0 -2px 4px 0 rgb(0, 0, 0, 0.1); - max-width: 750px; + max-width: 450px; &.expanded { display: flex; diff --git a/src/components/PDFView/PdfMarking.tsx b/src/components/PDFView/PdfMarking.tsx index e11ee65..222c393 100644 --- a/src/components/PDFView/PdfMarking.tsx +++ b/src/components/PDFView/PdfMarking.tsx @@ -70,8 +70,8 @@ const PdfMarking = (props: PdfMarkingProps) => { const handleMarkClick = (id: number) => { const nextMark = currentUserMarks.find((mark) => mark.mark.id === id) - setSelectedMark(nextMark!) - setSelectedMarkValue(nextMark?.mark.value ?? EMPTY) + + if (nextMark) handleCurrentUserMarkChange(nextMark) } const handleCurrentUserMarkChange = (mark: CurrentUserMark) => { diff --git a/src/utils/const.ts b/src/utils/const.ts index bf38404..522f242 100644 --- a/src/utils/const.ts +++ b/src/utils/const.ts @@ -119,6 +119,6 @@ export const SIGNATURE_PAD_OPTIONS = { } as const export const SIGNATURE_PAD_SIZE = { - width: 600, + width: 300, height: 300 }