How do i reset Safari 12 beforeunload events after pressing "Leave Page" without refreshing? - safari

I have a webpage with a form on it, and a beforeunload event.
When the page first loads, if the form is changed, a confirmation message appears on both Safari and Chrome.
In Chrome - if i press "leave page" and then return to the page, future changes keep invoking the conformation upon attempt to leave the page.
In Safari - if i press "leave page" and then return to the page, future changes to the form don't invoke the message when leaving the page, and the target page is loaded without problems.
If i refresh the page, the confirmation "resets".
I develop using Oracle Apex 5.1, but according to different forums this happens regardless of the platform:
https://github.com/codedance/jquery.AreYouSure/issues/112
Can you help me find a workaround?
Can i "Reset" safari without refreshing the page?

Related

Sentry.io Transactions Firing when tab loses focus

Using the Sentry Javascript SDK in a Vue web application, I am trying to log a user interaction.
The transaction should begin when the page being monitored is loaded and end when the user presses a Continue button.
I am calling Sentry.startTransaction when the page is loaded and .finish() on the created transaction object after user presses the continue button.
This works great in all scenarios except if the user switches tabs while this interaction is being monitored. If the user switches tabs after page loads but before pressing the continue button, Sentry immediately sends the transaction in a network request to be logged. The code calling .finish() is not executed, it appears to be a native Sentry behavior to auto-close all transactions when the tab loses focus.
If the user returns to the page and completes the interaction by pressing the button, the code calling .finish() is executed but Sentry does not make a network request to log the interaction.
Is this behavior a setting with Sentry?
I have searched for Sentry documentation explaining this "tab loses focus" behavior but have found nothing. I would expect that custom defined transactions using Sentry can be monitored whether or not the tab is in focus.

using onbeforeunload event, url change on 'Leave Page'

I am having a requirement that when a user makes his payment and reached on success page and go back it should be redirected to a custom page. So if i will click on browser back button it will show me two options - Leave Page and Stay on this page. When i will click on Leave page it should redirect to my custom page. I found following link useful but not working for 'Leave Page' button....kindly suggest or help.
using onbeforeunload event, url change on selecting stay on this page

Magnific-popup cancels all requests on open

I have a lot of thumb images on one page, each of them triggers magnific popup on click. The problem is, that opening magnific popup before all images are loaded cancels all other requests and some images never load.
My question is how to prevent magnific popup from cancelling the requests.
Try to set target:blank for the popup: like that, it will open the image in a new page and it won't stop the download of the current one...

Impossible to solve Sharepoint dropdown behavior

I am currently experiencing some very weird dropdown menu behavior in Sharepoint.
Summary of the issue
Dropdowns do not appear if I Ctrl+R to refresh the page. Dropdown items do appear if I click into the address bar and click enter. Also, if I make the page hit a breakpoint in developer tools while loading, the dropdown will work even when I hit Ctrl+R.
How to reproduce the issue:
Go to the website: http://www.jdaihelpdesk.org/default.aspx
Mouse over one of the menu items at the top, dropdown items will appear.
However, if you hit Ctrl+R to reload the page, when you mouse over one of the menu items, the dropdown will no longer appear.
Even weirder, if you open up developer tools and put a breakpoint on line 5 of the resource file titled http://www.jdaihelpdesk.org/ScriptResource.axd?d=mp6tevUL8oeNESOYJzVjF4zt3gpf2XdWLbE3BbLBQDYBVZVAQp00gRgopkUa1x9lC9s-iuzbDatvYvVbz7xnHLXzyr_vbt6Y91YZqrMVq_6N-PshJk3rZnu9fGlYq2Z8x9XfJo4ZhLF5WQffpPe1KcOEZvI1&t=2e2045e2
, hit Ctrl+R to refresh the page, after hitting continue, the menu item will work.
So it's like there's something to do with when resources are getting loaded or something but that's just a guess after hours of looking at this issue.
What's also weird to me is that hitting Ctrl+R will cause the dropdowns to not appear but clicking in the address bar and hitting Enter to load the page, the dropdowns will appear.
If anybody has any insights that would be awesome!

Can't retrieve the session on clicking of browser's back button

I have rails application that calculates prices of goods and I set prices in session. I have 'back' button in my application. When I clicks on 'back' link, I will get my previous session values like 'prices','goods' I purchased.
But when I clicks on 'browsers' back button,I won't get my session values, I have to refresh the page for that.
I'd say you have caching issues... The browser remembers what it saw before, and thinks it's the same (without even going to the trouble to ask the server any more). Try if this article helps
You probably want to prevent the browser from caching your pages so that they get refreshed when the user clicks the Back button. This article should help.