mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
scroll to top when api clicked in spaces (#4714)
* scroll to top when api clicked in spaces * changelog --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
409593e9cc
commit
b6f02bdd87
@ -30,6 +30,7 @@
|
||||
- When an error modal is shown in spaces, ensure we scroll to the top so it can be seen by [@pngwn](https://github.com/pngwn) in [PR 4712](https://github.com/gradio-app/gradio/pull/4712)
|
||||
- Update depedencies by [@pngwn](https://github.com/pngwn) in [PR 4675](https://github.com/gradio-app/gradio/pull/4675)
|
||||
- Fixes `gr.Dropdown` being cutoff at the bottom by [@abidlabs](https://github.com/abidlabs) in [PR 4691](https://github.com/gradio-app/gradio/pull/4691).
|
||||
- Scroll top when clicking "View API" in spaces by [@pngwn](https://github.com/pngwn) in [PR 4714](https://github.com/gradio-app/gradio/pull/4714)
|
||||
- Fix bug where `show_label` was hiding the entire component for `gr.Label` by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4713](https://github.com/gradio-app/gradio/pull/4713)
|
||||
|
||||
## Other Changes:
|
||||
|
@ -132,6 +132,9 @@
|
||||
|
||||
onMount(() => {
|
||||
document.body.style.overflow = "hidden";
|
||||
if ("parentIFrame" in window) {
|
||||
window.parentIFrame?.scrollTo(0, 0);
|
||||
}
|
||||
return () => {
|
||||
document.body.style.overflow = "auto";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user