malsup / blockui

jQuery BlockUI Plugin
http://jquery.malsup.com/block/
1.69k stars 506 forks source link

Safari problems #158

Open flaushi opened 3 years ago

flaushi commented 3 years ago

Hi. I tried the demo page https://jquery.malsup.com/block/ but it neither works in a current Safari nor Chrome.

My personal installation however does work with Chrome, but still Safari makes problems.

This code does show a spinner whenever a link or submit button is pressed. When the target page is loaded, the ui disappears. It works fine in Chrome. But Safari does not show it.

$(document).on('click',
    'a[href*="/"][target!="_blank"]:not(.suppress-block-ui), button[type=submit]:not(.suppress-block-ui)',
    function (e) {
       // e.preventDefault() // **
        if(! e.ctrlKey && !e.metaKey )
            myBlockUi();
    });

If I try to prevent the navigation (**), the ui does appear on Safari as well.