mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
Fixes chatbot autoscroll + Textbox lines > 20 issue (#3637)
* fixes * changelog * Update gradio/components.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
99fc2dd30f
commit
1aa2317a5f
@ -12,7 +12,9 @@
|
||||
- Fixes `Chatbot` and `Image` components so that files passed during processing are added to a directory where they can be served from, by [@abidlabs](https://github.com/abidlabs) in [PR 3523](https://github.com/gradio-app/gradio/pull/3523)
|
||||
- Use Gradio API server to send telemetry using `huggingface_hub` [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3488](https://github.com/gradio-app/gradio/pull/3488)
|
||||
- Fixes an an issue where if the Blocks scope was not exited, then State could be shared across sessions, by [@abidlabs](https://github.com/abidlabs) in [PR 3600](https://github.com/gradio-app/gradio/pull/3600)
|
||||
- Fixed bug where "or" was not being localized in file upload text by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3599](https://github.com/gradio-app/gradio/pull/3599)
|
||||
- Fixed bug where "or" was not being localized in file upload text by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3599](https://github.com/gradio-app/gradio/pull/3599)
|
||||
- Fixed bug where chatbot does not autoscroll inside of a tab, row or column by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3637](https://github.com/gradio-app/gradio/pull/3637)
|
||||
- Fixed bug where textbox shrinks when `lines` set to larger than 20 by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3637](https://github.com/gradio-app/gradio/pull/3637)
|
||||
- Ensure CSS has fully loaded before rendering the application, by [@pngwn](https://github.com/pngwn) in [PR 3573](https://github.com/gradio-app/gradio/pull/3573)
|
||||
|
||||
## Documentation Changes:
|
||||
|
@ -419,7 +419,10 @@ class Textbox(
|
||||
|
||||
#
|
||||
self.lines = lines
|
||||
self.max_lines = max_lines if type == "text" else 1
|
||||
if type == "text":
|
||||
self.max_lines = max(lines, max_lines)
|
||||
else:
|
||||
self.max_lines = 1
|
||||
self.placeholder = placeholder
|
||||
self.select: EventListenerMethod
|
||||
"""
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
beforeUpdate(() => {
|
||||
autoscroll =
|
||||
div && div.offsetHeight + div.scrollTop > div.scrollHeight - 20;
|
||||
div && div.offsetHeight + div.scrollTop > div.scrollHeight - 100;
|
||||
});
|
||||
|
||||
afterUpdate(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user