diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/PdfBlock.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/PdfBlock.tsx
index 1130d2b5..04b75432 100644
--- a/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/PdfBlock.tsx
+++ b/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/PdfBlock.tsx
@@ -59,11 +59,7 @@ interface PdfBlockComponentProps {
>;
}
-const PdfBlockComponent = ({
- editor,
- block,
- contentRef,
-}: PdfBlockComponentProps) => {
+const PdfBlockComponent = ({ editor, block }: PdfBlockComponentProps) => {
const pdfUrl = block.props.url;
const { i18n, t } = useTranslation();
const lang = i18n.resolvedLanguage;
@@ -114,27 +110,34 @@ const PdfBlockComponent = ({
void validatePDFContent();
}, [pdfUrl]);
+ if (isPDFContentLoading) {
+ return ;
+ }
+
+ if (!isPDFContentLoading && isPDFContent !== null && !isPDFContent) {
+ return (
+ editor.setTextCursorPosition(block)}
+ >
+ {t('Invalid or missing PDF file.')}
+
+ );
+ }
+
return (
-
+ <>
- {isPDFContentLoading && }
- {!isPDFContentLoading && isPDFContent !== null && !isPDFContent && (
- editor.setTextCursorPosition(block)}
- >
- {t('Invalid or missing PDF file.')}
-
- )}
@@ -158,7 +161,7 @@ const PdfBlockComponent = ({
/>
)}
-
+ >
);
};
diff --git a/src/frontend/apps/impress/src/layouts/MainLayout.tsx b/src/frontend/apps/impress/src/layouts/MainLayout.tsx
index 39abde49..9a295bae 100644
--- a/src/frontend/apps/impress/src/layouts/MainLayout.tsx
+++ b/src/frontend/apps/impress/src/layouts/MainLayout.tsx
@@ -120,7 +120,7 @@ const MainContent = ({
$css={css`
overflow-y: auto;
overflow-x: clip;
- &:focus {
+ &:focus-visible {
outline: 3px solid ${colorsTokens['brand-400']};
outline-offset: -3px;
}