"Leave site" popup appears when not required

  • I often get a "do you want to leave this site" browser dialog when closing the OMV admin tab. This happens when there is no unsaved information.


    For example:


    1. Login

    2. Click on "scheduled jobs"

    3. Close the browser tab


    This generates the popup, but it's not necessary.


    I can't exactly figure out how the system is determining whether to show this message or not (for example, if you simply log in and then close the tab, no warning is shown). If you login and go to "users" and then close the tab, the message is shown. If you login and go to "disks" it is not.


    I'd rather the warning is only shown when I've made a change that hasn't been saved.


    I'm on OMV 5.6.0-1, and I've seen the same behaviour on Brave, Chrome, Firefox and Safari (MacOS).


    Thanks,


    Gabe

  • OMV has always had this behavior but it is intended. Having changes to apply has nothing to do with the question. You could log out and then back in and the changes to apply would still be there. Maybe it is different with OMV 6.x. I don't know.

    omv 5.6.4 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • ryecoaaron Thanks for the reply.


    Why does it ask me to confirm to close the tab only on some pages?


    If I have made no configuration changes (i.e. logged in and clicked only on the left-hand navigation):

    - I get (unpredictably) a pop-up when I close the browser tab on the Dashboard

    - I always get a pop-up when I close the browser tab on the Users

    - I never get a pop-up when I close the browser tab on Disks


    Can you explain the intent a bit more?

  • Why does it ask me to confirm to close the tab only on some pages?

    I don't know. I thought it did on all pages. Maybe it doesn't on auto-refreshing grid screens?


    Can you explain the intent a bit more?

    Nope. I didn't write it. votdev did. With OMV 6.x in development, I doubt he would change the 5.x behavior.

    omv 5.6.4 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Is there a reason why you wouldn't just log out before closing the tab? That seems to me the proper way of being done with it.

    It's easier to click "X marks the spot", :D


    gabrielwhite

    I do believe that is standard procedure of the web page: as soon as you enter any section that has a possibility of changing something on OMV, the warning "trips". (that's my logical understanding)

    Maybe the code doesn't react to all tabs due to varies reasons: the DEV didn't want it/consider it wasn't needed, whatever.


    But, as cubemin said ---^^^^ just, just log out in the right way, from OMV and then, close the TAB.



  • It's a simple window.onbeforeunload hook in the HTML code that forces browser to display the dialog, nothing fancy and a default feature of browsers. The browser decides when to display the dialog, so it seems a problem with the browser and not the OMV code. Maybe a browser plugin causes the issue.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!