Forum Discussion

Keith Davis's avatar
Keith Davis
Steel Contributor
Jan 10, 2020

Back button fires JavaScript onchange event

Currently on Version 81.0.387.0 (Official build) canary (64-bit). Starting a few days (approx. 1/7/20), a problem has developed with our Intranet site so that when we go back, forms are losing (and sometimes actually changing) values. Cannot consistently reproduce, but happens 5-10 times a day. Usually, a refresh (F5) will restore the values, but not always.

 

Ok, now I know what is happening and yet, I have no idea why. When I click Back in Edge, and only Edge (I tested in Chrome and IE), the onchange event of a specific element fires. I can reproduce this consistently.

 

 

 

 

 

 

 

  • Keith Davis's avatar
    Keith Davis
    Steel Contributor

    Issue is resolved in:

     

    Version 81.0.396.0 (Official build) canary (64-bit)

     

    (maybe before, but definitely in this build)

  • Isn't "back" button only supposed to take user back to the previous URL?
    the contents of the URL can differ, the page might even need to be refreshed to work correctly
    • Keith Davis's avatar
      Keith Davis
      Steel Contributor

      HotCakeX 

       

      The issue was not "losing values", but somehow JavaScript events are firing that should have no possible way for that to occur.

    • Keith Davis's avatar
      Keith Davis
      Steel Contributor

      HotCakeX  Never has been a problem before. These are values saved in a database and loaded on each page load. I can't even swear it's the back button, I just know that on subsequent loads of the page, the browser appears to be changing the values of these forms. FYI, I'm the developer for this site, so I can see that the values are being loaded correctly in PHP, this is a UI only issue. 

Resources