Page jumps on Mac FF3 when AJAX pager link is clicked.

In order to reproduce this create any view, resize the window so that you have a vertical scroller for your window, then click on the pager. For this being an AJAX implementation, it is very jarring user experience.

CommentFileSizeAuthor
#3 ajax_view_scroll.patch.txt1 KByhahn

Comments

mineshaftgap’s picture

is anyone else effected by this?

youkho’s picture

same thing it's annoying

yhahn’s picture

StatusFileSize
new1 KB

This small patch smooths out this behavior:

  • Adds animation for scrolling between window positions
  • Only scrolls upward on an AJAX load (e.g. you click a pager and want to see what's at the top of the view). Scrolling downward almost always seems obtrusive to me.
yhahn’s picture

Status: Active » Needs review

Whoops, setting to CNR.

Bairnsfather’s picture

I patched the file with this code and really like it! I can't say I've tested it thoroughly though. The main thing I notice is that the spinning blue progress graphic doesn't show up any more.

If the top of the view is visible within the page's content area, the behavior is like 2.2, the page does not jump, and the view pages in-place.

But if the page has scrolled down so far as to cut off the top of the view, then clicking the pager will gently scroll the content of the page up enough so the top of the view is visible.

Very nice.

The only thing that would make this even more cool is if, for simple blocks, there was the option to scroll up enough to also show the block's header text (the name set in the blocks page). For now is only scrolls up enough to show the top of the view.

In any case, non-jumpy paging has me jumping for joy again. :-)

virtualdrupal’s picture

The patch in #3 works perfect for me

merlinofchaos’s picture

Status: Needs review » Fixed

Yay, that's something I was looking for in http://drupal.org/node/284413. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bryancasler’s picture

Version: 6.x-2.3 » 7.x-3.x-dev

Is it possible to port the patch from #3 to D7?

bryancasler’s picture

Category: bug » feature
visios’s picture

subscribing

nicothezulu’s picture

Hello, is there a solution to remove the scroll entirely?

bryancasler’s picture

nicothezulu, I'm actually running into a bug that is doing exactly that #1226290: Panels Everywhere breaks views paging

lessless’s picture

so, what about d7? i really do not need autoscroll to the top on page load :)

taiger’s picture

If you read through ajax-view.js in view/js you will see this functionality as the last function. I am not sure how it is added to views but it can be disabled using your own js.

This works, however, there could be a better way.

Drupal.ajax.prototype.commands.viewsScrollTop = false;
bryancasler’s picture

I actually think this is fixed in the latest dev. My site with Panels Everywhere scrolls properly. Can anyone else confirm?

bryancasler’s picture

double post edit