Support Article
Focus shifts to top upon expanding a grid row automatically
SA-16128
Summary
Whenever user clicks on the expanded record of any Repeat Grid, the focus is being shifted to the top of that record.
Error Messages
Not Applicable.
Steps to Reproduce
1. Create a section with Repeat Grid.
2. Set the Edit Mode for this grid to "Read Only" and check the Show Details checkbox present in the property panel and then provide a FlowAction details for the same.
3. Run the section and expand any one of the repeat grid record.
4. Scroll to the end of the expended record and then click on it.
Root Cause
This is an expected behavior of repeat grid.
Resolution
Perform the following local-change:
1. Create a non-auto generated section.
2. Put the below code in the section created in above step.
<script>
window.attachEvent('onload',function(){
if(pega && pega.u && pega.u.grid && pega.u.grid.prototype){
pega.u.grid.prototype.focusFirstElement = function(){};
}
});
</script>
3. Include this section, in the section where you are facing the issue.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.