Display PDF issue on modal window with Safari with last versions of Tiles

Issue #222 resolved
INALCO created an issue

Dear David,

Thank you very much for this very successful course format on our Moodle. We've been using it for 4 years.

We have upgraded to Moodle 4.4 and are experiencing a problem displaying PDFs in modal windows with the Safari browser: the PDF does not display at all.
When we uncheck PDF in Modal resources, the direct link works.

Moodle 4.4.2
Theme: boost_union 4.4-R1 or classic
Tiles: 4.4.0.17 and 4.4.0.20
Safari: versions 13, 15 and 17

We have several Moodle platforms. There's no such bug on our 4.4.2 test platform with tiles 4.4.0.9

We think there's a bug in a version > 4.4.0.9 (but we don't know which one)

Can you help us?
Here are some screenshots.

Do you need more information?

Thanks in advance

Pascal

Comments (16)

  1. INALCO reporter

    Thanks for the quick correction.
    However, testing on your demo site: under Safari (13, 15 and 17) when we click 2x on the PDF: the bug reappears on the 2nd click.

    Do you notice the same thing?

    (Also, we've seen that the index on the left doesn't appear on Safari 13: but I can open a ticket for this other problem, which doesn't seem to be related to the bug).

  2. David Watson repo owner

    Thanks I checked that and it does work more than once for me. Can you describe exactly what you do for the second click? E.g. close modal, click again or close tile/refresh page etc

    (With regard to the course index, I believe that is a Moodle core issue. For example I see the same thing at https://sandbox.moodledemo.net/ - do you? I suspect that Safari 13 was no longer current when the course index was introduced).

  3. INALCO reporter

    Here's what we do:

    • click on the PDF
    • close the modal
    • click again on the same PDF: it bugs

    If you click on another PDF, the PDF is displayed. But if you close the modal and click on the same PDF again, it bugs.

    If we refresh the page, we can click on the PDF : it appears but on the 2nd clic, it bugs.

    I will make a video.

    (Sorry for the course index, it is a Moodle core issue).

  4. David Watson repo owner
    • changed status to open

    Ok I see the issue. I will deploy the version I have for now but am re-opening to look at the 2nd launch point

  5. David Watson repo owner

    Please would you check the demo page again and see if it now works as expected on second launch? If that works I will put it into the next release.

    (It looks like, on second launch, Safari is trying but failing to use a cached version of the PDF. I am not clear why this causes a problem, but for now I propose having Safari fetch the PDF from the server on each launch and this seems to work for me.)

  6. Pascal

    Thank for your work.

    We checked on 2 computers :
    1/ if I open the PDF directly inside the tile first (it opens fine) but it no longer opens from the index (gray page). If I start with the index first, it opens fine and I can also open it from inside the tile without refreshing the page.

    2/ The same with another computer (Safari version 17.4.1):

    • 2 successive clicks on the PDF from the tile, it's OK
    • 1 click on the PDF from the tile, then click on the PDF from the index, it's KO (gray area)
    • 1 click on the PDF from the tile then click elsewhere on the page and click on the same PDF from the index, it's OK

  7. David Watson repo owner

    Thanks I made a further adjustment which I believe resolves those points. Please let me know if not

  8. Pascal

    Hello,

    I see version 4.4.0.25. Is the fix integrated?

    Do I still need to use the “master” branch for Moodle 4.4 ?

    Or moodle44 branch ?

  9. Log in to comment