gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Don't scroll to top upon error

Open osanseviero opened this issue 2 years ago • 3 comments

  • [x] I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
If you get an gr.Error such as https://huggingface.co/spaces/AP123/IllusionDiffusion when the queue is full , you automatically get scrolled to the top and shown the error. For mobile, this means I need to scroll to the submit button again.

Describe the solution you'd like
The error should be displayed where I am rather than change my position.

osanseviero avatar Sep 29 '23 14:09 osanseviero

We actually implemented this intentionally for spaces but I have another idea.

pngwn avatar Sep 29 '23 14:09 pngwn

@pngwn what was your idea? 💡

hannahblair avatar Aug 23 '24 09:08 hannahblair

I actually don't know if it will work in hindsight.

My idea was to use position absolute and update the top property based upon the scroll position of the page. But i think the scroll position actually lives on the iframe, not our page.

We may be able to access the scroll position of the iframe but I'm not sure.

pngwn avatar Aug 23 '24 10:08 pngwn

We investigated this quite a bit in the 5.0 release and couldn't find a way to implement this that works on Spaces. I think we should go ahead and close this since its a pretty minor inconvenience that should rarely happen

abidlabs avatar Nov 07 '24 01:11 abidlabs