SafeExamBrowser / seb-mac

Safe Exam Browser for macOS and iOS
https://www.safeexambrowser.org/macosx
96 stars 39 forks source link

Inline PDF do not take full size of window #354

Open acamacho-unige opened 5 months ago

acamacho-unige commented 5 months ago

Describe the bug When using SEB 3.3 on MacOS (recent versions, and recent mac computers) we saw a strange behaviour in multiple computers. As you can see in the video bellow, PDF files opened in a new window did only take a part of the avalaible space. This makes viewing those file impossible on those computers, and seemed to happen with PDF viewer, doesn't matter where the PDF's came from.

To Reproduce Steps to reproduce the behavior:

  1. Go on moodle platform, and click on a PDF file that does not trigger a download
  2. A new page opens with PDF viewer, all functions are avalaible and functioning

Expected behavior PDF should present in all the new window, and when resizing window that should change. PDF viewer takes 100% of width, but only has a fixed height of a few hundred pixels.

Screenshots See video

Version Information Please complete the following information:

https://github.com/SafeExamBrowser/seb-mac/assets/114589068/a688ad6a-3933-4a93-b774-5ef1b5b08b02

danschlet commented 5 months ago

Please provide a demo quiz where I reproduce that.

acamacho-unige commented 5 months ago

Hi,

We can send you a quiz, but the files were available through Moodle in a "file folder" activity. Files open in a new window.

But we can not reproduce this error on our Mac equipment (Intel Macbooks Pro).

Are you sure the quiz (moodle mbz) helps you ?

Thanks

danschlet commented 4 months ago

Well I would need any URL or SEB config where I can easily and reliably reproduce the issue, especially when you say you couldn't reproduce it on your Mac equipment. Not sure I will be able to reproduce it with any Moodle quiz and any PDF. I can try, but I will hardly have time to do trial-and-error before the next release.

At least the SEB log files might give me some hints, but I guess you don't have those.

Since SEB 3.x it would always be important to check, if the modern or classic WebView was used. You can do that with pinch-to-zoom on the trackpad (works on Mac only in modern WebView if zooming wasn't explicitly disabled in settings) or check in SEB log file.

acamacho-unige commented 1 week ago

Hi Daniel,

After more tests we can reproduce the error without problem now :

When using a mod_folder in Moodle, PDF files inside are showed inline with PDF.js library but have a problem in resolution (as you can see in the pictures).

When uploading PDF files to a mod_block, PDF files inside open in a new window and are showed inline with PDF.js library in full size without any problem.

We checked with same PDF file, and can reproduce that.

mod_folder block_html

Do you know where we could start looking ? Could it be a problem from Moodle theme ?

(We are using a very lightly modified version of official theme of Moodle 4)

danschlet commented 1 week ago

I'm not familiar with mod_folder or mod_block (I'm not a Moodle specialist). I would need some test/demo quiz/course (doesn't have to be protected with SEB as long as the issue occurs also without "Use Safe Exam Browser – Yes") where I can see and debug that.

Can you please provide me with such a course and a login? I cannot set that up in another Moodle on my own, I have way to much other open work.