<sp-link> works in manifest 4 but not 5?

Hey all, I’m just playing with upgrading to manifest version 5 from 4.
The below buttons open an external URL in a web browser use to work, but now don’t when changed to V5.

They are called from within a element.

<sp-button  quiet variant="primary" href="https://google.com">View Documentation</sp-button>
<sp-link href="https://google.com">Link Text</sp-link>

Looking at the v5 docs, I’ve also added this to my manifest but still can’t open a web link. I can get the <webview> example working in a dialogue however so I’m at a loss.

"manifestVersion": 5,
  "requiredPermissions": {
    "webview": {
      "allow": "yes",
      "domains": "all"
    },
    "network": {
      "domains": "all"
    }
  },
  "permissions": {
    "launchProcess": {
      "schemes":"https",
      "extensions": [ ".pdf", ".png",".jpg", ".psd" ]
    }
  }

https://developer.adobe.com/photoshop/uxp/2022/uxp/reference-js/Modules/shell/Shell/

In a nutshell - listen for the button click and then open browser/link with the above.

1 Like

Legend, thanks Tim. That did the trick.

My code for ref:

const shell = require("uxp").shell //get
const documentationLink = document.querySelector("#documentationLink") //button selector
documentationLink.addEventListener('click', function () {
    shell.openExternal("https://mywebsite.com") //open URL on button click
})

Interestingly, in manifest V4 I just used the SP-LINK element with href and worked fine.

1 Like