Skip to content

Commit 532ed81

Browse files
committed
scroll down button overlaps input box when the text is long
1 parent b49bc7d commit 532ed81

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/assets/styles/pages/_chat-interface.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
align-items: center;
1818
width: 100%;
1919
overflow: auto;
20+
position: relative;
2021

2122
>.header {
2223
display: flex;
@@ -89,8 +90,8 @@
8990

9091
.scroll-down-btn {
9192
z-index: 1;
92-
position: absolute;
93-
bottom: 7rem;
93+
position: sticky;
94+
bottom: 0.5rem;
9495
left: 50%;
9596
transform: translateX(-50%);
9697
min-width: 0;

src/components/ChatInterface.vue

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,15 @@
5959
<span class="spinner" />
6060
</div>
6161
</div>
62-
<div ref="bottomMarker"></div>
62+
<button
63+
v-if="!isAtBottom"
64+
@click="scrollToBottom({ smooth: true })"
65+
class="btn scroll-down-btn"
66+
title="Scroll to bottom"
67+
>
68+
<span class="material-symbols-outlined">keyboard_arrow_down</span>
69+
</button>
6370
</div>
64-
<button
65-
v-if="!isAtBottom"
66-
@click="scrollToBottom({ smooth: true })"
67-
class="btn scroll-down-btn"
68-
title="Scroll to bottom"
69-
>
70-
<span class="material-symbols-outlined">keyboard_arrow_down</span>
71-
</button>
7271
<div class="chat-input-container-container">
7372
<PromptInput storage-key="inputHistory" :processing="processing" :selected-model="model"
7473
@select-model="selectModel" @manage-models="$emit('manage-models')" @submit="submit" @stop="stop" />

0 commit comments

Comments
 (0)