Recherches récentes


Pas de recherche récente

Navigating views from Top Bar app

Avec réponse


Publication le 13 nov. 2021

Hi!

I'm building a simple app to navigate views via an app that drops down from the Top Bar. Similar to Quickie Plus (or the old free version, Quickie) and I'm unable to get the browser to go to a new page. All the methods that StackOverflow suggests are blocked.

eg.

<ahref="#"onclick="top.window.location.href='{{this.link}}';">

Gives an error of

Unsafe attempt to initiate navigation for frame with origin 'https://<subdomain>.zendesk.com' from frame with URL 'http://localhost:4567/iframe.html?origin=https%3A%2F%.zendesk.com&app_guid=d81a3df6-a20c-4ace-a6ac-5a6b8deb7d62'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set.

Can I have some guidance as to how to implement this?

Thanks!


0

3

3 commentaire

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Matthew,

We do not allow targeting the DOM in the Apps Framework for security and stability reasons. I'd suggest using our routeTo method instead to open up the view when called.

Hope this helps,

 

0


🤦🏻‍♂️

I knew there had to be a method and I’d looked right past it! Thanks!

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

No worries Matthew! 

0


Vous devez vous connecter pour laisser un commentaire.

Vous ne trouvez pas ce que vous cherchez ?

Nouvelle publication