Home Forums General Issues Avoid Unnecessary JS Alert


Avoid Unnecessary JS Alert

  • Hi!

    I’m using a Google Map Field from ACF inside a custom template, it loads well and the data is saved correctly.

    But there is a situation that does not have to happen:

    I select the exact location on the map and when I want to save the page it shows a JS Alert, with the following message:

    (original in portuguese) “Esta página quer saber se você deseja mesmo sair – informações fornecidas podem ser perdidas”

    (I guess the translation in English would be more or less this): “This page wants to know if you really want to quit – information provided may be lost”

    with the option of “Stay on the page” or “Exit the page”.
    In fact the field has already been completed and there is nothing to lose.

    I want this Alert not to appear.
    Can anyone tell me if I can disable it in any way?

    Thanks any tips!


  • You can disable this popup by including the following. I have not tested it on the newest version but we had it working about a year ago.

    jQuery( document ).ready( function() {
        // disable the ACF js navigate away pop up = false;
    } );
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Avoid Unnecessary JS Alert’ is closed to new replies.