Skip to content

Fix two mobile chat-widget polish bugs (input height, header seam)#6

Open
aaronaccessvr wants to merge 1 commit into
mainfrom
fix/mobile-chat-input-and-header
Open

Fix two mobile chat-widget polish bugs (input height, header seam)#6
aaronaccessvr wants to merge 1 commit into
mainfrom
fix/mobile-chat-input-and-header

Conversation

@aaronaccessvr
Copy link
Copy Markdown
Collaborator

Summary

Two small mobile-only visual fixes:

ChatInput.vue — textarea collapsed on first mount.
The chat iframe starts display: none (parent page only flips it visible after open()), so on mobile WebKit scrollHeight reads back as zero when resize() runs from onMounted(focus). The old code wrote that zero as an inline style.height, leaving the field too short until the first keystroke ran resize() again with the iframe now visible. Fix: when the textarea is empty, skip touching the height and let rows="1" provide the natural one-line height.

ChatHeader.vue — white seam at the bottom of the dark header bar on the channel-select screen.
ChatHeader and the home-page heading slot (Start a conversation / What channel do you prefer?) both use mainColor as their background, but a 1px gap can still appear at the flex boundary between them on mobile WebKit — showing the iframe <body>'s white through. Added -mb-px to ChatHeader's outer div so the next flex item overlaps the header's last pixel; the two same-color regions meet without a visible gap.

Test plan

  • Mobile (iOS Safari or DevTools mobile emulation): open the widget on a fresh visit, verify the textarea renders at one-line height with the placeholder visible — not collapsed to a sliver.
  • Mobile: open the widget to the channel-select home screen, verify the dark area is continuous from the top close-X bar down through "What channel do you prefer?" with no visible horizontal line in between.
  • Desktop: verify no regression — input still grows to fit multi-line content up to the 128px cap; header still renders the dock toggle, back, and close controls correctly.

🤖 Generated with Claude Code

ChatInput textarea collapsed on first mount: the chat iframe starts
display:none until the parent page calls open(), and on mobile WebKit
that means scrollHeight reads back at zero at mount time. The old
resize() wrote that zero as an inline height, so the field rendered
too short until the first keystroke ran resize again with the iframe
visible. Skip resize when the textarea is empty and let rows="1"
provide the natural one-line height.

White seam at the bottom of the dark header bar on the channel-select
screen: ChatHeader and the page's heading slot both use mainColor as
their background, but a 1px gap can still appear at the flex boundary
between them on mobile WebKit, showing the body's white through. Give
ChatHeader -mb-px so the next flex item overlaps the header's last
pixel; the two same-color regions meet without a visible gap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants