Skip to content

Commit f78030e

Browse files
committed
fix(Sign): restore visibleElements check in needCreateSignature to avoid blocking clickToSign
The commit e9ea794 changed needCreateSignature to return true for any signer with a signRequestId, without checking whether visual elements were placed. This caused the 'Sign the document.' button to be hidden in clickToSign scenarios, because the 'Define your signature' prompt was shown instead. The signerHasSignRequest flag is already passed to the validator in confirmSignDocument and executeSigningAction, so the drawing prompt is triggered at action time when appropriate (e.g. GRAPHIC_ONLY mode). The upfront needCreateSignature computed should only block the sign button when there are placed visible elements for this signer. Fixes E2E tests: multi-signer-sequential, sign-email-token-unauthenticated, sign-herself-with-click-to-sign Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 518c8d8 commit f78030e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/views/SignPDF/_partials/Sign.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,11 @@ export default {
273273
}
274274
const document = this.signStore.document || {}
275275
const signer = document?.signers?.find(row => row.me) || {}
276-
return !!signer.signRequestId
276+
if (!signer.signRequestId) {
277+
return false
278+
}
279+
const visibleElements = document?.visibleElements || []
280+
return visibleElements.some(row => String(row.signRequestId) === String(signer.signRequestId))
277281
},
278282
needIdentificationDocuments() {
279283
return this.identificationDocumentStore.showDocumentsComponent()

0 commit comments

Comments
 (0)