firebase / firebaseui-web

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.
https://firebase.google.com/
Apache License 2.0
4.58k stars 1.06k forks source link

preventScroll config option. #751

Open IanBellomy opened 4 years ago

IanBellomy commented 4 years ago

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.

omarkasem commented 3 years ago

Is there any solution for this issue?