Currently, the scroll into view script in Scaffold will scroll an element into the middle of the view. This was a fix implemented to an issue with how elements would scroll elements into the top of the view.
Technically, either functionality isn't ideal. The best case scenario for scrolling into view is to bring the element into view with the least distance required. For example, if a user would like to click a button that exists down the web page, we should scroll the element into view where the element will be at the bottom of the screen.
We should also think about whether or not we need to scroll elements into view prior to clicking them. Some experimentation should be done to try different implementations.
A/C
Scaffold should only scroll an element into view with the least possible distance required
Summary
Currently, the scroll into view script in Scaffold will scroll an element into the middle of the view. This was a fix implemented to an issue with how elements would scroll elements into the top of the view.
Technically, either functionality isn't ideal. The best case scenario for scrolling into view is to bring the element into view with the least distance required. For example, if a user would like to click a button that exists down the web page, we should scroll the element into view where the element will be at the bottom of the screen.
We should also think about whether or not we need to scroll elements into view prior to clicking them. Some experimentation should be done to try different implementations.
A/C