🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: input text width
RaktimaNXG9d81fce956f0
diff --git a/apps/OpenSign/src/components/pdf/PlaceholderType.js b/apps/OpenSign/src/components/pdf/PlaceholderType.jsindex f808e3e96..0ad072812 100644--- a/apps/OpenSign/src/components/pdf/PlaceholderType.js+++ b/apps/OpenSign/src/components/pdf/PlaceholderType.js@@ -135,7 +135,7 @@ function PlaceholderType(props) {}}// eslint-disable-next-line react-hooks/exhaustive-deps- }, [props.pos]);+ }, [props.pos?.options?.defaultValue]);const ExampleCustomInput = forwardRef(({ value, onClick }, ref) => (<div@@ -403,33 +403,6 @@ function PlaceholderType(props) {case textInputWidget:return props.isSignYourself ||(props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? (- // <input- // className="inputPlaceholder"- // ref={inputRef}- // placeholder={validatePlaceholder}- // style={{ fontSize: calculateFontSize() }}- // value={textValue}- // type="text"- // tabIndex="0"- // disabled={- // props.isNeedSign && props.data?.signerObjId !== props.signerObjId- // ? true- // : props.isPlaceholder- // }- // onBlur={handleInputBlur}- // onChange={(e) => {- // setTextValue(e.target.value);- // onChangeInput(- // e.target.value,- // props.pos.key,- // props.xyPostion,- // props.index,- // props.setXyPostion,- // props.data && props.data?.Id,- // false- // );- // }}- // /><textarearef={inputRef}placeholder={validatePlaceholder}@@ -533,29 +506,6 @@ function PlaceholderType(props) {case "name":return props.isSignYourself ||(props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? (- // <input- // tabIndex="0"- // ref={inputRef}- // placeholder={"name"}- // style={{ fontSize: calculateFontSize() }}- // className="inputPlaceholder"- // type="text"- // value={textValue}- // onBlur={handleInputBlur}- // onChange={(e) => {- // const isDefault = false;- // handleTextValid(e);- // onChangeInput(- // e.target.value,- // props.pos.key,- // props.xyPostion,- // props.index,- // props.setXyPostion,- // props.data && props.data?.Id,- // isDefault- // );- // }}- // /><textarearef={inputRef}placeholder={"name"}@@ -597,27 +547,6 @@ function PlaceholderType(props) {case "company":return props.isSignYourself ||(props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? (- // <input- // className="inputPlaceholder"- // type="text"- // ref={inputRef}- // placeholder={"company"}- // style={{ fontSize: calculateFontSize() }}- // value={textValue}- // onBlur={handleInputBlur}- // onChange={(e) => {- // handleTextValid(e);- // onChangeInput(- // e.target.value,- // props.pos.key,- // props.xyPostion,- // props.index,- // props.setXyPostion,- // props.data && props.data?.Id,- // false- // );- // }}- // /><textarearef={inputRef}placeholder="Enter label"@@ -658,27 +587,6 @@ function PlaceholderType(props) {case "job title":return props.isSignYourself ||(props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? (- // <input- // className="inputPlaceholder"- // type="text"- // ref={inputRef}- // placeholder={"job title"}- // style={{ fontSize: calculateFontSize() }}- // value={textValue}- // onBlur={handleInputBlur}- // onChange={(e) => {- // handleTextValid(e);- // onChangeInput(- // e.target.value,- // props.pos.key,- // props.xyPostion,- // props.index,- // props.setXyPostion,- // props.data && props.data?.Id,- // false- // );- // }}- // /><textarearef={inputRef}placeholder={"job title"}@@ -801,27 +709,6 @@ function PlaceholderType(props) {case "email":return props.isSignYourself ||(props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? (- // <input- // className="inputPlaceholder"- // type="text"- // ref={inputRef}- // placeholder={"email"}- // style={{ fontSize: calculateFontSize() }}- // value={textValue}- // onBlur={handleInputBlur}- // onChange={(e) => {- // handleTextValid(e);- // onChangeInput(- // e.target.value,- // props.pos.key,- // props.xyPostion,- // props.index,- // props.setXyPostion,- // props.data && props.data?.Id,- // false- // );- // }}- // /><textarearef={inputRef}placeholder={"email"}diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.jsindex b366f651c..d0c82b44b 100644--- a/apps/OpenSign/src/constant/Utils.js+++ b/apps/OpenSign/src/constant/Utils.js@@ -1383,25 +1383,7 @@ export const multiSignEmbed = async (});y -= 18; // Adjust the line height as needed}- }- // else if (widgetTypeExist) {- // const font = await pdfDoc.embedFont("Helvetica");- // const fontSize = 12;- // let textContent;- // if (position?.options?.response) {- // textContent = position.options?.response;- // } else if (position?.options?.defaultValue) {- // textContent = position?.options?.defaultValue;- // }- // page.drawText(textContent, {- // x: xPos(position),- // y: yPos(position) + 10,- // size: fontSize,- // font,- // color: rgb(0, 0, 0)- // });- // }- else if (position.type === "dropdown") {+ } else if (position.type === "dropdown") {const dropdownRandomId = "dropdown" + randomId();const dropdown = form.createDropdown(dropdownRandomId);dropdown.addOptions(position?.options?.values);diff --git a/apps/OpenSign/src/styles/signature.css b/apps/OpenSign/src/styles/signature.cssindex 4a4f23646..fa82742e7 100644--- a/apps/OpenSign/src/styles/signature.css+++ b/apps/OpenSign/src/styles/signature.css@@ -496,11 +496,15 @@overflow: hidden !important;text-overflow: ellipsis;}+.disabled {- opacity: 0.5; /* Example: reduce opacity to visually indicate disabled state */- pointer-events: none; /* Prevents mouse clicks and other events */+ opacity: 0.5;+ /* Example: reduce opacity to visually indicate disabled state */+ pointer-events: none;+ /* Prevents mouse clicks and other events *//* background-color: #888; */}+.useEmail {font-size: 10px;color: #424242;@@ -851,6 +855,7 @@ option {z-index: 999;border-radius: 2px;resize: none;+ overflow: hidden;}.labelTextArea:focus {