Quick Reply - Asks whether user wants to leave or stay on every quick reply made

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • notfrostyjosh
    New Member
    • Jun 2011
    • 28
    • 4.1.x

    [Forum] Quick Reply - Asks whether user wants to leave or stay on every quick reply made

    I have version 4.1.4 running with no plugins/modifications running at www.easywdw.com/forums. I reverted all templates.

    Every time a user enters a quick reply and selects the "Post reply button" the browser asks, "This page is asking you to confirm that you want to leave - data you have entered may not be saved." If the user selects "leave page" the thread will be reloaded with their reply posted. If the user selects "stay on page" they will stay on the same thread. If they remove what they wrote in the quick reply box and select "leave page" it will leave the page without a reply.

    I tried to repair/optimize tables as someone suggested in another thread and the problem persists.

    Anyone know how to fix this or disable the stay on page/leave page altogether?
  • Andy
    Senior Member
    • Jan 2002
    • 5886
    • 4.1.x

    #2
    I'm not sure why your forum experiences this problem, but here is a solution. Check out this JIRA feature request:



    It shows how to disable the annoying "confirm that you want to leave" prompt. Please vote on this feature too.

    Comment

    • notfrostyjosh
      New Member
      • Jun 2011
      • 28
      • 4.1.x

      #3
      Thanks Andy. I had to download the package with uncompressed JavaScript then edit that file and overwrite the previous one. If you install the default package files you won't be able to edit that specific line of code. While the Leave page/stay on page thing might be helpful in some scenarios, I don't think most people appreciate it and it's a hassle to explain what it is to all the people who have never seen it before.

      Comment

      • Andy
        Senior Member
        • Jan 2002
        • 5886
        • 4.1.x

        #4
        Originally posted by notfrostyjosh
        Thanks Andy. I had to download the package with uncompressed JavaScript then edit that file and overwrite the previous one. If you install the default package files you won't be able to edit that specific line of code. While the Leave page/stay on page thing might be helpful in some scenarios, I don't think most people appreciate it and it's a hassle to explain what it is to all the people who have never seen it before.
        Happy to help.

        Don't forget to vote on the JIRA issue to have an option to easily disable it.

        Comment

        • jimnyc
          Senior Member
          • Aug 2003
          • 191
          • 2.3.0

          #5
          Originally posted by Andy
          I'm not sure why your forum experiences this problem, but here is a solution. Check out this JIRA feature request:



          It shows how to disable the annoying "confirm that you want to leave" prompt. Please vote on this feature too.
          Andy, I've tried editing this file as per the tracker, many times, to no avail. Unless I'm looking at it wrong, it looks like all I need to do is add two //'s before the beginning of the line. If I do this, then the "annoying" popup goes away, but then no one can edit posts any longer. I get rid of the slashes and editing returns, along with the popup. Am I supposed to do anything other than add them slashes at the beginning of the line, just prior to YAHOO?

          Many thanks!
          .

          Comment

          • Andy
            Senior Member
            • Jan 2002
            • 5886
            • 4.1.x

            #6
            Originally posted by jimnyc
            Andy, I've tried editing this file as per the tracker, many times, to no avail. Unless I'm looking at it wrong, it looks like all I need to do is add two //'s before the beginning of the line. If I do this, then the "annoying" popup goes away, but then no one can edit posts any longer. I get rid of the slashes and editing returns, along with the popup. Am I supposed to do anything other than add them slashes at the beginning of the line, just prior to YAHOO?

            Many thanks!
            Hi Jim,

            You are following the instructions correctly, just add two forward slashes to comment out that line.

            Code:
            	if (addlistener)
            	{
            		//YAHOO.util.Event.addListener(window, "beforeunload", this.exit_prompt, this, true);
            	}
            I'm not sure why you can't edit after commenting out that line, works fine for me and others who have tried it.

            Comment

            • jimnyc
              Senior Member
              • Aug 2003
              • 191
              • 2.3.0

              #7
              With a little help from Andy I was able to figure what I was doing wrong. The instructions in the version tracker linked above are 100% spot on. I needed to download the 4.1.5 package again, but this time specify in the options just prior to downloading to NOT compress .JS files. When not compressed, the formatting on the javascript files are lined up just as specified, add the 2 slashes ( //) and the pop-up disappears.

              A perfect and very easy fix. Thanks, Andy!!
              .

              Comment

              • c.wilson
                New Member
                • Jan 2006
                • 27
                • 3.5.x

                #8
                Any other ideas, this just started happening to me today and this above fix did not work (4.1.7)

                Comment

                • Andy
                  Senior Member
                  • Jan 2002
                  • 5886
                  • 4.1.x

                  #9
                  In post #7 it is suggested that the uncompressed version of vbulletin be installed, this is not advised as it will have major problems with the ckeditor.

                  I have only tested this on vb 4.1.5 and it works for me, comment out the following line.

                  Code:
                  clientscript/vbulletin_textedit.js
                  
                  Disable the annoying prompt "This page is asking you to confirm that you want to leave - data you have entered may not be saved.".
                  
                  Line 753
                  
                  	if (addlistener)
                  	{
                  		//YAHOO.util.Event.addListener(window, "beforeunload", this.exit_prompt, this, true);
                  	}

                  Comment

                  • temp 4
                    Member
                    • Jun 2007
                    • 52

                    #10
                    tried it with 4.1.7 compressed JS.

                    works, but it takes away all the text editor controls.

                    Comment

                    • Wayne Luke
                      vBulletin Technical Support Lead
                      • Aug 2000
                      • 73976

                      #11
                      Originally posted by temp 4
                      tried it with 4.1.7 compressed JS.

                      works, but it takes away all the text editor controls.
                      This is because you have your mobile styles set to the same style as your desktop styles under Settings -> Options -> Style & Language Options. Should be set to None if you don't have an explicit mobile style installed.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API

                      Comment

                      • addalover
                        New Member
                        • Nov 2010
                        • 9
                        • 4.0.x

                        #12
                        Same problem with me. Text editor menu gone away after edit the compressed .js file on vb 4.1.7 . I have also set mobile style to none. How to solve this matter ?

                        Comment

                        • Wayne Luke
                          vBulletin Technical Support Lead
                          • Aug 2000
                          • 73976

                          #13
                          Originally posted by addalover
                          Same problem with me. Text editor menu gone away after edit the compressed .js file on vb 4.1.7 . I have also set mobile style to none. How to solve this matter ?
                          Restore the default files and don't edit the javascript.
                          Translations provided by Google.

                          Wayne Luke
                          The Rabid Badger - a vBulletin Cloud demonstration site.
                          vBulletin 5 API

                          Comment

                          • addalover
                            New Member
                            • Nov 2010
                            • 9
                            • 4.0.x

                            #14
                            Originally posted by Wayne Luke
                            Restore the default files and don't edit the javascript.
                            Then how to get rid of this? It is annoying!

                            Comment

                            • Wayne Luke
                              vBulletin Technical Support Lead
                              • Aug 2000
                              • 73976

                              #15
                              Originally posted by addalover
                              Then how to get rid of this? It is annoying!
                              Shouldn't appear unless you actually select the Quick Reply in the latest versions of the software.
                              Translations provided by Google.

                              Wayne Luke
                              The Rabid Badger - a vBulletin Cloud demonstration site.
                              vBulletin 5 API

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...