Scroll to an element in a popup

Hi. I have added a popup in my app and I have made it scrollable by using custom css, (overflow: scroll, height: some height in px;)

My popup has an input field at the end of the popup but when I open the popup it leaves all the elements in the start of the popup and scrolls to the input element. I tried using the scroll to option in the workflow which says that when a popup is opened then scroll to the top heading of the popup but that is not working. Any idea about where am i going wrong or how to solve this issue?

Hey @mohid :wave:

Thanks for the post! And, interesting problem. Without seeing it, it can be hard to know exactly what’s going on. But, it almost sounds like the input is being focussed automatically when the popup opens and so Bubble is scrolling to it. There’s a workaround for this shared here: Date Picker is Focused When Popup is Shown

And of course, if you continue to have questions, or want to discuss further, don’t hesitate to email us directly at Support@Bubble.io

1 Like

Hey @Andrew.Vernon

Thank you for the response. And I solved it exactly the same way as it is told in the link that you shared but I do want to know how to change the focus of the element when a popup is opened. If you can help me in that. Thanks! :slightly_smiling_face:

Glad to hear that helped! And sure thing… There’s actually an action for that as well. In your workflow editor, you’ll search for ‘focus’ and should find an action where all you do is specify which input you want to set focus to.

Give it a try and feel free to email us with any questions → Support@Bubble.io

@Andrew.Vernon Thanks :slight_smile:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.