jquery.AreYouSure icon indicating copy to clipboard operation
jquery.AreYouSure copied to clipboard

Safari 9.1.1: No prompt after first refresh

Open RandomByte opened this issue 9 years ago • 4 comments

Using the latest Safari, the user only gets prompted on the first refresh with unsaved changes. Any succeeding refreshes with unsaved form changes do not lead to a prompt.

I don't use this plugin, but see that it runs into the same issues I do with my (very similar) implementation. So maybe you guys have an idea.

Steps to reproduce

Chrome 9.1.1 on Mac OS X 10.11.5 (El Capitan)

  1. Open the Demo Page from readme
  2. Make a change in any form (e.g. change the coffee dropdown in the first form)
  3. Reload the page
    -> "Are you sure you want to leave this page?" dialog appears
  4. Confirm the dialog with "Leave Page"
  5. Make another change
  6. Reload the page
    => No dialog appears and the page gets reloaded

I suspect that this might be some kind of security measure introduced by Safari. In Chrome, all the succeeding dialogs have a little checkbox saying "Prevent this page from creating additional dialogs". Maybe the Safari developers decided to ditch any additional dialogs without asking the user (they do something similar with popup blocking).

In the latest release notes they only mention that they now use a generic string to prompt the user rather than the custom one supplied by the application.

RandomByte avatar Jun 27 '16 15:06 RandomByte

I'm facing the same issue. Using beta Safari Version 10.0 (11602.1.32.7)

radeknovis avatar Jul 05 '16 12:07 radeknovis

Same behavior using Safari Version 9.1.2 (11601.7.7) on El Capitan 10.11.6 (15G31)

XCame avatar Aug 10 '16 11:08 XCame

Same problem here

missbruni avatar Sep 06 '16 15:09 missbruni

Seems to be a Safari Bug. Same Problem here on Stack Overflow without a relation to AreYouSure http://stackoverflow.com/questions/37268874/beforeunload-not-working-in-safari-9-1-after-the-page-reloads-on-clicking-leave

XCame avatar Sep 06 '16 17:09 XCame