This is a migrated thread and some comments may be shown as answers.

When tabbing in row on grid page auto scrolls

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Don asked on 21 Mar 2013, 10:15 PM
I am having an issue when we have a large grid with more rows that will fit on the screen.  So then there is a vertical scrollbar in the browser.  My page has a header on it above the grid.  When I tab in a row, the page automatically scrolls to have the table/grid as the top of the page.

I was able to track this down in the full web file to a function that is called when the cell is edited.  The function is focusTable.  When called there is code to set the table position and this is causing the auto scrolling.  Is there anyway to disable this? 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 25 Mar 2013, 02:13 PM
Hello Don,

The observed behavior is determined by the browser - for example, Internet Explorer always scrolls the page, so that focused elements are fully visible, or if this is impossible, their top edge is aligned with the top edge of the browser viewport.

I am not sure which Kendo UI version you are using, but we have made improvements to the Grid keyboard navigation, so upgrading to Q1 2013 is recommended. There are still some issues related to in-cell editing, which are to be addressed.

Removing the focus (focusTable) will prevent the Grid's keyboard navigation from working. A possible workaround is to save the page scroll position periodically and restore it when the Grid receives focus (subscribe to the Grid <div>'s focus event). However, I don't recommend this approach as it may cause visible flickering. Generally, every browser scrolls automatically, so that a focused element becomes visible. I can also recommend reducing the Grid height, so that the widget fully fits on the majority of users' screens.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Don
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or