Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-94444

window.onbeforeunload does not fire when navigating away from a page

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.0.0 DXP FP76
    • Fix Version/s: None
    • Component/s: Accessibility
    • Labels:
      None
    • OS:
      Windows Server 2012
    • JDK:
      Oracle Sun JDK 8
    • Application Servers:
      Apache Tomcat 8.0.x
    • Browsers:
      Chrome (latest), Edge 25, Firefox (latest)

      Description

      Hi,  I am trying to display a message if the user has made some changes in the panel app page and does not save the changes and trying to redirect to some other page.

      I tried with window. onbeforeunload it is not working properly.

      <script>    window.onbeforeunload = function() {

               return "Do you really want to leave our application?";  

           };

      </script>

      I referred issue no: LPS-76019 and tested with patch 43  but I am getting not getting my customized message. 

        Attachments

        1. chrome.JPG
          chrome.JPG
          13 kB
        2. Firefox.JPG
          Firefox.JPG
          20 kB
        3. IE.JPG
          IE.JPG
          23 kB

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              shyamivy Shyam
              Participants of an Issue:
              Recent user:
              Shyam
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                5 weeks ago