Inline Frame blocking external URL

Hi! I'm working on a Perspective weather page data and I'm using the Inline Frame component to get weather data from an external URL. Unfortunately for me, the external site has links to another pages and I don't want the user to be capable of clicking and navigate to the sites referenced by the page at the inline frame. Is it possible to block the navigation or the click action over the Inline Frame component so it never redirects to another URL?

Blocking the navigation specifically might be able to get blocked with some js...

Just preventing any user input is quite easy with css, it will disable all user click though.
You can add a style pointer-events:none.

If that is acceptable use that,
Else you will have to create an iframe with a markdown component and use the sandbox atribute and allow everything exept navigation. I know it exists, but i have never used it.

Hi @victordcq it worked with the style prop. Thank you!

1 Like

Do note that this isnt a secure way to prevent clicks, so dont use it as a security measure

1 Like

Ok. In this case, this is just to avoid navigation to the main page of the weather site.

Yes i know thats why i suggested it:p Its fine for here, but dont start using pointer-events to disable admin only buttons or something. just giving a general warning for this css property

2 Likes