• Hello,

    There is a problem with the javascript file “dlm-xhr.js” for newer versions of Safari (both mobile and desktop), making certain types of downloads appear not to work. The issue is this on line 448 in the function dlmLogDownload:

    downloadTab = window.open('', target);

    On Safari, this will now flash a very short message “Popup Window Blocked” in the address bar. It does not seem to log the blockage in the console.

    On our part I’ve temporarily worked around this issue by adding

    // Apparently neccessary for Safari 2025-08-25
    if (!downloadTab) downloadTab = window;

    — tho this of course opens the link in the current window.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Teo Alex

    (@altesin)

    Hi @iverok ,

    We tried to reproduce the issue you’re seeing, but we haven’t been able to so far.

    Could you please share a few more details?

    • Your current Download Monitor settings (screenshots are great)
    • How the download is configured (access, redirect, XHR, etc.)
    • The exact version of Safari and macOS you’re using
    • Whether the issue also occurs in a Private Window and with extensions disabled
    • Any console/network errors from Safari’s Develop → Show Web Inspector

    The code you shared is adjusted to better handle Safari’s stricter rules around opening new tabs/windows via JavaScript, which should reduce this kind of behavior but it seems it does not.

    Once we have the details above, we’ll investigate further.
    Thanks!

    Warm regards,
    Teo

    Thread Starter Iver Odin Kvello

    (@iverok)

    Not sure how to produce all of this but anyway, the download is accessed via URL, which looks like so:

    /download/2767/?tmstv=1755864220

    Download #2767 is set up with “redirect to file”. There is no checks for “Open in new tab” or “Terms & conditions required”.

    This dispatches via the dlmLogDownload function in the mentioned file, which calls admin-ajax with the action ‘log_dlm_xhr_download’. This succeeds, but with downloadTab empty, the final redirect cannot happen.

    The desktop version of Safari that reproduces this is Version 18.6 (20621.3.11.11.3) . No issues with chrome or firefox or anything else I’ve tried. The issue occurs as soon as window.open is called.

    Plugin Author Teo Alex

    (@altesin)

    Hello @iverok,

    Would it be possible to send us the direct download link or a link to a test page with a sample download using the support contact form? This would help us investigate the issue further and provide a more accurate solution.

    Thank you in advance,
    Teo

    • This reply was modified 9 months, 2 weeks ago by Teo Alex.
    Thread Starter Iver Odin Kvello

    (@iverok)

    I’ve set up an instance that shows the problem and reported it on your support contact form.

    Unfortunately I’ve got no suggestion as to how to fix it.

    Thread Starter Iver Odin Kvello

    (@iverok)

    From support; this fixes the issue:

    add_filter( 'dlm_do_xhr', '__return_false' );

    https://download-monitor.com/kb/action-and-filter-reference/

    Thank you for your support.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Javascript problem with newer Safaris (mobile & desktop)’ is closed to new replies.