Skip to content

Commit c88b058

Browse files
a2ucursoragent
andcommitted
Disable scroll position adjustment on mobile
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c385d27 commit c88b058

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

docs/.vuepress/components/Chat.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,17 @@ export default {
124124
this.handleScroll(); // Recalculate position on resize
125125
},
126126
handleScroll() {
127+
// Only apply scroll positioning on desktop
128+
if (this.isMobile) {
129+
this.dynamicBottom = 15;
130+
return;
131+
}
127132
const distanceToPageBottom =
128133
document.documentElement.scrollHeight -
129134
window.scrollY -
130135
window.innerHeight;
131-
const defaultBottom = this.isMobile ? 15 : 20;
132136
// Keep element at least stopFromBottom pixels from the page bottom
133-
this.dynamicBottom = Math.max(defaultBottom, this.stopFromBottom - distanceToPageBottom);
137+
this.dynamicBottom = Math.max(20, this.stopFromBottom - distanceToPageBottom);
134138
},
135139
onIframeLoad() {
136140
this.isLoading = false;

0 commit comments

Comments
 (0)