Search code examples
shopifyshopify-app

How to set style style on Shopify EASDK modal.confirm


This appears to have stopped working since Shopify released the "app bridge".

My modal code is this (straight from docs):

    ShopifyApp.Modal.confirm({
      title: "Delete your account?",
      message: "Do you want to delete your account? This can't be undone.",
      okButton: "Yes, delete my account",
      cancelButton: "No, keep my account"
    }, function(result){
      alert("The modal was closed.");
    });

The docs say this:

All modal dialogs can also accept a style: 'danger' attribute which will change the primary button from blue to red, useful for delete confirmations.

This is what appears: enter image description here

As you can see, I have no style attribute included in my code, however, the modal is still styled with the red button (which should be only for the danger style). Try the other disabled style attribute also does nothing.

Is this broken now? Or is there new undocumented ways to set this?


Solution

  • This issue was discovered to be a bug with our Legacy Bridge, a compatibility layer that powers EASDK apps now that App Bridge is the default, and a fix has been applied. It will be deploying shortly. I apologize on behalf of the App Bridge team for the inconvenience this might have caused you.

    Andrew

    App Bridge (iOS Mobile)