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
Prevent broken scroll_to_output in Spaces #4822
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-4822-all-demos |
Chromatic build successful 🎉 |
Can't reproduce the issue on Seeing if something broke on Edit: I can't repro on a recent PR deploy either: |
@@ -283,7 +283,7 @@ def set_event_trigger( | |||
"js": js, | |||
"queue": False if fn is None else queue, | |||
"api_name": api_name, | |||
"scroll_to_output": scroll_to_output, | |||
"scroll_to_output": False if utils.get_space() else scroll_to_output, |
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.
You shouldn't change it here -- otherwise even if a developer explicitly sets scroll_to_output=True
in the event, it won't take effect in Spaces. I would change the the default value in set_event_trigger()
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.
Disagree, it will break the app on Spaces, so even if it's explicitly allowed we stop it on Spaces. If a user sets it locally and then uploads it to spaces, it shouldn't break the app on spaces.
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.
👍
IMG_6056.MOVI can recreate on main (see above) and it’s fixed in this or (see below): IMG_6057.MOVSo this looks good to me from that standpoint! |
Really confused why we’re seeing different behavior though. Maybe I have some ancient cookie in my safari browser? Or maybe my safari version is really old? |
Thanks for testing! |
Previously, a simple demo like below was broken on mobile on spaces, because Interface would force a scroll to output, and some glitch in iframeResizer would block scrolling back. Removed scroll_to_output on spaces