I'm currently developing a Sencha Touch mobile app. I have a form panel with multiple fields, so I made it scrollable. However, every time I open the screen (panel), scroll down, navigate to other screens, and then return to the form panel, it stays scrolled to the bottom position. I want it to always reset to the top whenever I open it. I've attempted some code in the activate event of the form, but it doesn't seem to be effective. I tried the following code snippet in the activate event:
this.formPan.element.dom.scrollTo('top', 0);
//this.formPan.reset();
//Ext.getCmp('mainscreenpanelId').element.dom.parentElement.style['-webkit-transform'] = 'translate3d(0px, 0px, 0px)'
//--The third commented line of code works, but after activation or focus on the form again, it returns to the last scrolled position--
I also looked for a method to scroll to the top, but couldn't find one. Is there any way to achieve this?
The images below further illustrate my issue - the first image shows the default screen when opening the form for the first time: https://i.sstatic.net/2nduK.png
The second image shows the form remaining scrolled to the bottom: https://i.sstatic.net/MMmkL.png