angular-ui / ui-grid

UI Grid: an Angular Data Grid
http://ui-grid.info
MIT License
5.38k stars 2.47k forks source link

[BUG] scrollToIfNecessary down not working as expected #7299

Closed Seeyko closed 6 months ago

Seeyko commented 9 months ago

Describe the bug When using the method scrollToIfNecessary for scrolling down. If the row we are scrolling is in the viewport under the horizontal scrollbar it doesn't work because it use the row "top" pixels to calculate if it need to scrolls or not.

To Reproduce Steps to reproduce the behavior:

  1. Go to http://ui-grid.info/docs/#!/tutorial/Tutorial:%20202%20Cell%20Navigation
  2. Focus one of row 10 cell
  3. Use enter twice to go to the row 12
  4. Notice that the scroll does not happen on row 12 and we see only row 11.

Expected behavior Use row bottom pixel as "bounds" to know if we need to scroll or not.

Additional context

We use bottom pixels only to show correctly the row: image

We would need to use the bottom pixels in the bounds calculation too.

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 6 months ago

This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.