-
Notifications
You must be signed in to change notification settings - Fork 37
Fix: fix unexpected scroll behavior in textarea #2536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Daishan Peng <[email protected]>
} | ||
}; | ||
} | ||
|
||
function findScrollContainer(el: HTMLElement): HTMLElement | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this is unnecessary? I think we should be using this action on a textarea
and setting that with a scroll overflowY if we're using autoHeight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem here is that the parent div is scrollable, not the textarea. I tried to set on textarea and it didn't work.
export function autoHeight(node: HTMLTextAreaElement) { | ||
const scrollContainer = findScrollContainer(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screen.Recording.2025-04-15.at.10.20.06.AM.mov
Looks like it turns the text area into a crazy long height for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#2507