Skip to content

Commit 0172917

Browse files
committed
chore: fix send question buttons alignment on chrome and safari
1 parent 53a7295 commit 0172917

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

chat-with-context/src/chat-with-context.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,11 @@ customElement(
357357
onInput={() => fixInputHeight()}
358358
/>
359359

360-
{/* send button positioned inside the input, anchored to the textarea bottom */}
360+
{/* send button positioned inside the input, vertically centered with first line */}
361361
<button
362362
type="submit"
363363
title={loading() ? "Stop generation" : "Send question"}
364-
class={`absolute right-2 bottom-1.5 w-8 h-8 flex items-center justify-center rounded-full text-slate-500 bg-slate-100 dark:text-slate-400 dark:bg-slate-700 border border-slate-300 dark:border-slate-600 shadow-sm ${
364+
class={`absolute right-2 top-1 w-8 h-8 flex items-center justify-center rounded-full text-slate-500 bg-slate-100 dark:text-slate-400 dark:bg-slate-700 border border-slate-300 dark:border-slate-600 shadow-sm ${
365365
loading() ? "loading-spark" : ""
366366
}`}
367367
aria-label={loading() ? "Stop generation" : "Send question"}
@@ -374,8 +374,8 @@ customElement(
374374
</button>
375375
</div>
376376

377-
{/* Start new conversation button moved outside the growing textarea area and aligned to textarea bottom */}
378-
<div class="flex-shrink-0 self-end mb-1.5">
377+
{/* Start new conversation button aligned to match submit button position */}
378+
<div class="flex-shrink-0 self-start mt-1">
379379
<button
380380
title="Start a new conversation"
381381
class="w-8 h-8 flex items-center justify-center rounded-full text-slate-500 bg-slate-100 dark:text-slate-400 dark:bg-slate-700 border border-slate-300 dark:border-slate-600 shadow-sm"

0 commit comments

Comments
 (0)