FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
Calling start(...) with just the email option will automatically create a text input for email and give it focus. All good.
However, the internal focus() call can cause the container and/or document to scroll to the control, which is undesirable if the control is in an element being revealed via animation from off screen e.g. the controls are in a slide-out side-panel in an otherwise scroll-locked SPA.
I propose that the configuration object include an optional preventScroll field that'd be passed to internal focus() calls.
Additionally, I wonder if preventScroll:true should be the default in order to avoid scrolling side-effects given that Firebaseui is a drop-in solution.
Calling
start(...)
with just the email option will automatically create a text input for email and give it focus. All good.However, the internal
focus()
call can cause the container and/or document to scroll to the control, which is undesirable if the control is in an element being revealed via animation from off screen e.g. the controls are in a slide-out side-panel in an otherwise scroll-locked SPA.I propose that the configuration object include an optional
preventScroll
field that'd be passed to internalfocus()
calls.Additionally, I wonder if
preventScroll:true
should be the default in order to avoid scrolling side-effects given that Firebaseui is a drop-in solution.