Hey all, is anyone else seeing this since the new admin started rolling out?
We open the product editor from inside a full screen App Bridge modal:
<Modal id="bundle-editor" variant="max" open>
{/* editor UI */}
</Modal>
const activity = await shopify.intents.invoke('edit:shopify/Product', { value: productGid });
const result = await activity.complete;
On stores with the new admin (admin_theme=admin-next in the iframe URL), the product editor opens behind our max modal, so the merchant just sees our modal sitting there and nothing happens. Close our modal and the product editor is right underneath. On stores still on the old admin (admin_theme=admin), the same code opens the product editor on top like it always did.
Same thing happens with edit:shopify/Menu.
There isn’t anything we can do from the app side as far as I can tell. Both modals are rendered by the admin, and there’s no option on intents.invoke or to control which one is on top. For now we’re opening the editor in a new admin tab instead, but we’d love to go back to the intent.
Possibly related, though that one was posted before the new admin rolled out: Shopify Intent shows below App Bridge Modal
Has anyone found a way around this, or is it a known issue with the new admin?
Hey @Faheem_MB could you share a slightly fuller example showing how you’re getting the shopify instance and the click handler that opens the product editor from the modal? That would help me understand the setup around the intent call.
Could you also include your @shopify/app-bridge-react version and browser name/version?
A stripped-down example with placeholder IDs is fine. Please remove any tokens or customer data before posting.
We are seeing this issue as well, making the product editor inaccessible.
Our embedded app opens a same-origin route inside:
<ui-modal
src="/modal-content"
variant="max"
/>
A button inside that modal invokes the native product editor:
const activity = await shopify.intents.invoke(
'edit:shopify/Product',
{value: productGid},
);
const response = await activity.complete;
Expected: The Shopify product editor opens above the max modal.
Actual: The product editor opens behind the max modal. It only becomes visible after the max modal is closed, so the merchant cannot interact with it.
Setup:
- Embedded iframe app
@shopify/app-bridge-react: 3.7.11
- Mac / Google Chrome
Thanks for looking into this! Here’s a stripped-down version of our setup.
We load App Bridge from the CDN in our document head, and use the global shopify instance it creates:
<meta name="shopify-api-key" content="<API_KEY>" />
<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>
The editor is an inline React max modal, and the click handler lives inside it:
import { Modal } from '@shopify/app-bridge-react';
function BundleEditor({ open, onClose, productGid }) {
const [loading, setLoading] = useState(false);
const handleEditProduct = async () => {
setLoading(true);
try {
const activity = await shopify.intents.invoke('edit:shopify/Product', {
value: productGid, // e.g. 'gid://shopify/Product/1234567890'
});
const result = await activity.complete;
// sync product data if result.code === 'ok'
} finally {
setLoading(false);
}
};
return (
<Modal id="bundle-editor" variant="max" open={open} onHide={onClose}>
<button onClick={handleEditProduct} disabled={loading}>Edit Parent Product</button>
</Modal>
);
}
- @shopify/app-bridge-react: 4.2.13`
- Browser: Chrome 155 on Linux
It only happens on stores with the new admin (admin_theme=admin-next in the iframe URL). On a store still on the old admin (admin_theme=admin), the exact same build opens the product editor on top. edit:shopify/Menu behaves the same way. Happy to share store details over DM if that helps.
Hey @Faheem_MB thanks for sharing the example and checking both admin versions. I don’t see an obvious explanation in that code for the editor opening behind the modal. Could you reach out to our support team through the help center while logged into the affected store or Partner organization? We’ll need to take a closer look at the affected app and store. You can share those details privately there and link this thread so the team has the context you’ve already provided.
@BeefyNachos there’s one check worth trying with your src modal. If the modal route is invoking the intent through its own shopify instance, could you have it send a message to the main app and invoke the intent there instead? Keep the max modal open to see whether that changes where the editor opens. Our modal guide covers this communication pattern.
If you’re already invoking from the main app, or the editor still opens underneath, please reach out to support with this thread and the result. You can also go straight to support if this is blocking your work.
I believe this has been fixed by Shopify without needing any modifications on our side now too: Intents not rendering on top of a max modal and are inaccessible - #5 by marcbaumbach