Floating chat_input

  1. running my app locally
  2. Streamlit 1.39 and Python 3.12 versions.

chat_input bar is floating when i put it inside tab 2. how to make it fixed at bottom like it does as default.

 tab1, tab2 = st.tabs(["🔍 Search Papers", "📄 Upload Papers"])

    # Track which tab is currently selected
    if 'selected_tab' not in st.session_state:
        st.session_state.selected_tab = 0
    
    with tab1:
        st.session_state.selected_tab = 0
        search_interface(db, rag_engine)

    with tab2:
    
        st.session_state.selected_tab = 1
        upload_interface(db, pdf_processor, rag_engine)
    
        st.chat_input("Type your search phrase here2...",
                            disabled=st.session_state.get(
                                "chat_disabled", False),
                            key="chat_input2")

    # Chat input in main body (outside tabs) for proper bottom-sticky behavior
    # Show when papers are available (the tab logic doesn't work reliably)
    if db.get_all_papers():
        prompt = st.chat_input("Type your search phrase here...",
                            disabled=st.session_state.get(
                                "chat_disabled", False),
                            key="chat_input")

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.