-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
priority:P2Medium-high priority - fix within one monthMedium-high priority - fix within one monthstatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expectedtype:regressionThis bug is a regression from previous behaviorThis bug is a regression from previous behavior
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
When visiting an app with a URL that has an anchor link (e.g. foo.com/myapp#myanchor) Streamlit should scroll to the anchor #myanchor on the page. This is not happening today.
Reproducible Code Example
import streamlit as st
st.header("My title 1")
for _ in range(30):
st.text("blah " * 100)
st.header("My title 2")
for _ in range(30):
st.text("blah " * 100)Steps To Reproduce
- Run the code above
- A Streamlit app will load in a browser tab
- Open a new browser tab (it has to be a new tab!)
- Navigate to the URL http://localhost:8501/#my-title-2
Expected Behavior
The app loads and the viewport is scrolled to "My title 2".
Current Behavior
The app loads but the viewport is at the top, at "My title 1".
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.45
- Python version: 3.13
- Operating System: MacOS
- Browser: Chrome
Additional Information
No response
github-actions, ghilesmeddour, departamentoitufm, TrevorJLee, fkerem and 1 more
Metadata
Metadata
Assignees
Labels
priority:P2Medium-high priority - fix within one monthMedium-high priority - fix within one monthstatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expectedtype:regressionThis bug is a regression from previous behaviorThis bug is a regression from previous behavior