Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(agent-profile): auto-scroll page when drag-selecting in source mode (#21559)

YuTengjing6cabb092f5f0
diff --git a/src/routes/(main)/agent/profile/index.tsx b/src/routes/(main)/agent/profile/index.tsx
index 8842c016099..52113427676 100644
--- a/src/routes/(main)/agent/profile/index.tsx
+++ b/src/routes/(main)/agent/profile/index.tsx
@@ -26,6 +26,13 @@ import { useClickToFocusEditor } from './features/useClickToFocusEditor';
const styles = StyleSheet.create({
contentWrapper: {
+ /**
+ * Do not stretch the column to this scroller's height. A stretched column
+ * stays viewport-tall while the editor overflows it, so CodeMirror picks it
+ * as the nearest scrollable ancestor (`scrollHeight > clientHeight`) and
+ * drag-selecting past the bottom edge scrolls nothing.
+ */
+ alignItems: 'flex-start',
cursor: 'text',
display: 'flex',
overflowY: 'auto',