diff --git a/templates/label_system/dialog.html.twig b/templates/label_system/dialog.html.twig index b9149aa3..c8af5140 100644 --- a/templates/label_system/dialog.html.twig +++ b/templates/label_system/dialog.html.twig @@ -135,8 +135,9 @@ {% block additional_content %} {% if pdf_data %} -
- + {# Make the PDF viewer a few pixels taller so Chromium-based browsers show the PDF toolbar by default (fixes #1165) #} +
+
{% endif %} diff --git a/tests/Template/LabelDialogTemplateTest.php b/tests/Template/LabelDialogTemplateTest.php new file mode 100644 index 00000000..35c028e9 --- /dev/null +++ b/tests/Template/LabelDialogTemplateTest.php @@ -0,0 +1,16 @@ +assertStringContainsString('id="pdf_preview"', $tpl, 'PDF object id must exist'); + $this->assertStringContainsString('height: 280px', $tpl, 'Default PDF viewer height should be 280px to make the toolbar visible in Chromium-based browsers'); + } +}