Closed almirb closed 7 years ago
This doesn't look like a bug or issue to me, different people have different tastes. Set your defaults to what you like them to be.
The default is scrolling to the top because that's how browser navigation usually works: when you change the page, you're brought to the top of the new page. However, you can change the default yourself, as you already found out, or you can specify the scrollTo
value for every individual $.pjax
call if you need to.
Hi!
I'm using pjax for erasing values of my gridview. But after the request the page always scrolls to top. That's annoying.... After a little research, I discovered I could overcome the problem with
Why the Yii Pjax Widget (yii\widgets\Pjax) has the 'scrollTo' default value = false and in jquery.pjax.js the defaults are definied with 'scrollTo: 0'?
In jquery.pjax.js (around line 920):
Thanks in advance!
P.S.: I also created a post in Yii Forum.