Skip to content

Commit

Permalink
refactor: replace iframe with embed tag
Browse files Browse the repository at this point in the history
  • Loading branch information
vsgoulart committed Dec 12, 2024
1 parent e2877e2 commit bb132e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions packages/form-js-viewer/assets/form-js-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1197,10 +1197,9 @@
z-index: 1;
}

.fjs-container .fjs-documentPreview-iframe {
.fjs-container .fjs-documentPreview-pdf-viewer {
all: unset;
width: 100%;
overflow: auto;
min-height: 400px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,7 @@ function DocumentRenderer(props) {
class={singleDocumentContainerClassName}
style={{ maxHeight }}
aria-describedby={hasError ? errorMessageId : undefined}>
<iframe src={fullUrl} class={`fjs-${type}-iframe`} />
<DownloadButton
endpoint={fullUrl}
fileName={metadata.fileName}
onDownloadError={() => {
setHasError(true);
}}
/>
<embed src={fullUrl} type="application/pdf" class={`fjs-${type}-pdf-viewer`} />
{hasError ? <Errors id={errorMessageId} errors={[errorMessage]} /> : null}
</div>
);
Expand Down

0 comments on commit bb132e0

Please sign in to comment.