With Jquery Mobile 1.4.0-rc1 updating panel with $( "#mypanel" ).trigger( "updatelayout" ) causes screen to scroll to top. This did not happen with version 1.3.x
Yep, a regression: http://jsbin.com/ofuhaw/795
If I comment out this line, the problem goes away:
If you comment out the one line that scrolls to top it wont scroll to top. This line is there for a reason and does exactly what is intended. The real question is why is the positionPanel method being called in this case when it should not be.
@arschmitz Sorry, I'm just helping narrow down in the code where the problem occurs. If my comments aren't helpful then I won't make them.
The panel calls _positionPanel() intentionally upon updatelayout to fix #5535. Perhaps it does not need to scroll to top. Perhaps _positionPanel() can be broken up into multiple functions, only some of which are called from updatelayout.
Panel: Do not scroll to top upon updatelayout