Skip to content

[Bug]: Shared/embedded chat page (/chats/share) has no visible input bar on mobile browsers #22474

Open

Description

@0x1917

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (Language Policy).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

db1cd59 (v1.0.0). The layout code below is unchanged on main at eb8f811.

RAGFlow image version

v1.0.0

Other environment information

Docker Compose deployment, official web bundle.
Page: the chat assistant's "Embed into webpage" link, /chats/share?shared_id=<chat_id>&auth=<beta token>
Mobile browser: reproduced on a real phone browser with its toolbars visible (exact device and version not recorded)
Desktop browsers are not affected.

Actual behavior

On a phone, the shared chat page shows the header and the messages, but the message input bar is cut off below the bottom of the screen, and the page cannot be scrolled to reach it. Users cannot type a question.

The page is taller than the screen, and scrolling is disabled:

  1. html, body and #root are fixed to the viewport with overflow: hidden:
    html,
    body,
    #root {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    }
  2. EmbedContainer renders <section className="h-[100vh] ...">. Below the md breakpoint, its inner box is w-full h-full, with a header (border-b p-3) above the children:
    <section className="h-[100vh] flex justify-center items-center">
    <div className="w-full h-full md:w-[80vw] md:h-auto border-0 md:border rounded-none md:rounded-lg">
    <div className="flex justify-between items-center border-b p-3 relative">
  3. The share page puts the message list and the input bar in <div className="flex flex-1 flex-col p-2.5 h-[90vh] m-3">, with the input bar at the bottom:
    <div className="flex flex-1 flex-col p-2.5 h-[90vh] m-3">

On mobile the stack is header (about 57px) + 90vh + 24px of margin. That only fits in 100vh when 10vh is more than about 81px, i.e. a viewport taller than about 810px.

On mobile Safari and Chrome, vh is also measured against the large viewport (browser toolbars hidden). That is taller than the area the user actually sees while the toolbars are showing. So the 90vh box extends past the visible screen, and the input bar, which sits at its bottom, ends up below the fold. Because the root is overflow: hidden, it cannot be scrolled into view.

On desktop (md and up), the inner box is md:h-auto and centered, so the layout fits and the input bar is visible.

Note: desktop-browser device emulation does not reproduce this reliably, because emulated vh equals the visible viewport. In headless Chromium at 390×664 the input bar's bottom edge lands at 602px, barely on screen. It does reproduce on a real phone.

Expected behavior

On a phone, the shared chat page fits the visible screen: header at the top, the message list scrolling in the middle, and the input bar always visible at the bottom.

Steps to reproduce

1. Create a chat assistant and open "Embed into webpage" to get the share link.
2. Open the link on a phone (e.g. iOS Safari or Android Chrome) with the browser toolbars visible.
3. The header and messages are shown, but the input bar is missing at the bottom, and the page cannot be scrolled to it.
4. Open the same link in a desktop browser: the input bar is visible.

Additional information

A CSS-only change fixes it on mobile. Applied as an override, it was verified with the input bar visible and the header stable while replies stream. Below md: size the section with 100dvh, make the inner box a flex column, and let the content area fill the remaining height instead of 90vh:

@media (max-width: 767.98px) {
  section.h-\[100vh\] { height: 100dvh; }
  section.h-\[100vh\] > div { display: flex; flex-direction: column; }
  section.h-\[100vh\] > div > .h-\[90vh\] { height: auto; flex: 1 1 0%; min-height: 0; margin: 0; }
}

In the components, this would be:

  • EmbedContainer: h-[100dvh] on the section, and flex flex-col md:block on the inner box.
  • Share page: min-h-0 flex-1 md:h-[90vh] md:m-3 on the content wrapper, instead of h-[90vh] m-3.

A related mobile-only glitch shows up once the input bar is visible. EmbedContainer hides the Reset button while a reply streams (hideReset={sendLoading}). Below md, the title is absolutely positioned and the 24px logo is the only other in-flow item, so the header shrinks from 57px to 49px for the length of every reply, and its bottom border jumps by 8px when the reply starts and when it ends. Giving the header a minimum height (e.g. min-h-[calc(3.5rem+1px)] below md), or keeping the button mounted but invisible while loading, keeps it stable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions