Forum Discussion
Back button fires JavaScript onchange event
The issue was not "losing values", but somehow JavaScript events are firing that should have no possible way for that to occur.
- Keith DavisJan 16, 2020Iron Contributor
Well, that was causing the UI issue - the JS being "cached" is an AJAX request that updates part of the page (and not doing it correctly since it should not be fired at that point). I could fix the AJAX issue to work anyway, but I need to know why it's even being called - makes no sense, but I can reproduce 100% of the time in Edge, but not in any other browser.
In fact, I just tested all the channels (latest version) - the issue does not occur in Beta or Stable but does occur in Dev and Canary. If this problem makes it to Beta, we will have big problems (we have users on Beta and Stable).
- HotCakeXJan 16, 2020MVPSpoiler
Keith Davis wrote:Well, that was causing the UI issue - the JS being "cached" is an AJAX request that updates part of the page (and not doing it correctly since it should not be fired at that point). I could fix the AJAX issue to work anyway, but I need to know why it's even being called - makes no sense, but I can reproduce 100% of the time in Edge, but not in any other browser.
In fact, I just tested all the channels (latest version) - the issue does not occur in Beta or Stable but does occur in Dev and Canary. If this problem makes it to Beta, we will have big problems (we have users on Beta and Stable).
you can have the fix ready beforehand so in case that happens you will be able to push it and prevent any issue in your organization
- Keith DavisJan 16, 2020Iron Contributor
I don't know what you mean. There is no fix AFAIK. If a user hits the back button, JS events fire that should not unless the element is interacted with and I don't know of any way to work around the problem. This could be devastating, even cause data loss for us.
- Keith DavisJan 16, 2020Iron Contributor
I added some debug code so that I could see all AJAX calls made and when I hit the back button, all of these are made that are on the page. All of which are tied to onchange or onclick events of specific elements.