Steamlit Text Box Covered by "Select RAG mode"
Closed this issue · 4 comments
Exactly the same for me — runing in ubuntu 22.04, tried both local firefox browser or NAT another chrome browser.
Ran into the same issue. Worked around the problem by giving the fixed position to the chatbox, instead of the "Select RAG mode" pane. This is done by modifying the CSS style for Streamlit UI in bot.py file: 1) commenting out the "position: fixed" line for the '.element-container:has(aria-lable="Select RAG mode"' element, and 2) adding "position: fixed" line for the '.stChatFloatingInputContainer' element.
With these changes, the chatbox takes a fixed position at the bottom of the page, while the "Select RAG mode" pane becomes a floating element. So, the chatbox is no longer covered by the "Select RAG mode". This workaround allowed me to continue with the demo app successfully.
--- Streamlit UI style sheet modification in bot.py file ---
Streamlit UI
styl = f"""
<style> /* not great support for :has yet (hello FireFox), but using it for now */ .element-container:has([aria-label="Select RAG mode"]) {{ # position: fixed; # Commented out line bottom: 33px; background: white; z-index: 101; }} .stChatFloatingInputContainer {{ bottom: 20px; position: fixed; # Added line }} ,,,