Streamlit is running in snowflake, version 1.5.and a link to a word document from sharepoint is displayed. when i rightclick open in a new tab, it opens up but when i left click and open it opens the tab but doesnt render the webpage , instead its blank
Hey, thanks for sharing your question and welcome to the community! It seems likely that this issue is due to how Streamlit (especially when running in Snowflake) and browsers handle security for embedded links. When you left-click the link, Streamlit or the browser may open it in a sandboxed iframe without the necessary permissions (like allow-forms), which prevents the SharePoint page from rendering. Right-clicking and opening in a new tab bypasses this restriction, so the page loads as expected. This is a known limitation with sandboxed iframes and external sites, especially with services like SharePoint that require certain permissions to display content in an embedded context.
My understanding is that there isn’t a Streamlit config or parameter to change this behavior directly, as the sandboxing is enforced for security reasons and is not user-configurable in Streamlit’s markdown or link rendering. This is also consistent with similar issues reported in the Streamlit community, where links to external sites often require opening in a new tab to work properly due to browser and platform security policies. You might consider instructing users to right-click and open in a new tab, or use a button that triggers a JavaScript redirect (if allowed in your environment), but there is no official Streamlit API to change the iframe sandbox attributes or permissions for links in markdown or HTML.