How to avoid Shopify app opening in a new tab?
Solution:
I think you answer this one by simply ensuring you are keeping track of the right parameters, and Shopify will not do the new tab. So ensure you have your host and shop parameters throughout the lifecycle of all calls to your App. If you are not setting the host, or handling the admin.shopify.com domain correctly, Shopify is sending you to the legacy handler, and that opens your App in a new tab it seems, reminding you to ensure you are handling all the parameters correctly for both the new and hold Shopify App domains.
Answer
Solution:
Looks like this may be a bug on Shopify's end.
There is a github issue reported here: https://github.com/Shopify/shopify-app-bridge/issues/160#issuecomment-1425990569 (https://github.com/Shopify/shopify-app-bridge/issues/160#issuecomment-1425990569)
And there is a thread I found on the Shopify developer forums: https://community.shopify.com/c/technical-q-a/force-legacy-domain-1-cascading-redirects-using-shopify-app/td-p/1938587 (https://community.shopify.com/c/technical-q-a/force-legacy-domain-1-cascading-redirects-using-shopify-app/td-p/1938587)
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.