Starting with iOS 15 and Safari 15, VF pages using alert, confirm, prompt dialogs will be blocked
Trailblazer Community

Starting with iOS 15 and Safari 15, VF pages using alert, confirm, prompt dialogs will be blocked

Mobile , Salesforce CPQ (Configure-Price-Quote)

Last updated 25 days ago ·Reference W-9785451 ·Reported By 51 users

In Review

Summary
Starting with iOS 15.0 and macOS Safari 15, Apple will begin blocking cross-origin dialogs in web content. Blocking of these prompts would mean that customers using Visualforce would no longer see ‘alert’, ‘confirm’, or ‘prompt’ dialogs in their implementation.

This change also affects both mobile devices running iOS 15 and macOS desktops running Safari 15. Salesforce is working closely with Apple to remedy this for mobile and desktop users as soon as possible.


Salesforce CPQ:
This change will affect Salesforce CPQ instances where any of the above dialogs are designed to present information to the user. Many managed packages for Revenue Cloud use these standard prompts.

In Salesforce CPQ, this will present as if nothing is happening when an action is selected. For example, when selecting ‘Delete Group’ on a Quote record, the user is supposed to be presented with a prompt, “All lines will also be deleted. Are you sure you want to delete this group?” However, this prompt isn’t shown, and the action can’t be completed.

If your users are experiencing failures in workflows that previously worked, it might be due to this change.
Please refer to the specific Known Issue or Salesforce CPQ
https://trailblazer.salesforce.com/issues_view?&Id=a1p4V000002RSkA

Salesforce Billing:
This change will affect Salesforce Billing instances where any of the above dialogs are designed to present information to the user. Many managed packages for Revenue Cloud use these standard prompts.

In Salesforce Billing, this will primarily present as if nothing is happening when an action is selected and an error condition occurs. For example, when an error occurs when estimating taxes for a Credit or Debit Note, the user is supposed to be presented with a prompt stating the error and how to resolve it. However, this prompt isn’t shown, and so it appears to the user as if nothing is happening.

If your users are experiencing failures in workflows that previously worked, it

Repro
On Visualforce pages, JavaScript dialogs invoked using alert, confirm, or prompt are blocked. Dialogs fail silently, and the Visualforce page presents as if nothing has happened.

For example, when added to a Visualforce page, the following code won’t present either the prompt or alert dialog:

let favColor = prompt("What's your favorite color?");

if (favColor.toLowerCase() == "green") {
alert("The green iPhone 11 was great, right?");
}

Workaround
Mobile users on iOS:
For iOS 15.0, there is no known workaround for this issue. Customers relying on these prompts are advised not to upgrade, and wait until a later release of iOS.

In iOS 15.1, this change is reverted, and ‘alert’, ‘confirm’, and ‘prompt’ work as expected. However, iOS 15.1 is still in beta and not generally available to the public.



Desktop users on macOS:
For macOS users running Safari 15, you can temporarily work around this issue by enabling the ‘Develop’ menu from Safari Preferences > Advanced. After it’s enabled, use the Develop menu to check the ‘Disable Cross-Origin Restrictions’ item. Then, reload the page you’re on, and prompts will work as expected.

An additional step is required for Salesforce CPQ. One of the following two options will be sufficient:
* Enabled the CPQ setting Improve Browser Performance
* Open the Developer Console and keep it open in the background.

We expect a future version of Safari on desktop to revert this behavior. Until then, it's recommended to use a different web browser if the above workarounds cannot be implemented.

Updates
With the release of iOS 15.1 and Safari 15.1 on October 25, 2021, these issues no longer occur on iOS devices. Please encourage your users to upgrade to iOS 15.1 to continue using VisualForce pages with embedded alerts.

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.