I am using Ajax pager to display content, three items per page.

When I click on the next button to load the next three items, the items load but I am still stuck at the bottom of the page. My understanding is that it should smooth scroll back up to the top of the view so the user can see the first item.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

What kind of view do you use? Is it a content pane display?

matthewdolman’s picture

It is a page, placed in the main content block of a page.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

In general i suggest you to use content pane as display type.
Can you verify whether the bug still exist with this?

dawehner’s picture

In general i suggest you to use content pane as display type.
Can you verify whether the bug still exist with this?

matthewdolman’s picture

I'm sorry I don't understand.

When I create the view I get various options like Block, Feed, Page Etc

This is a Page, and I set the URL in which it displays.

I don't see any options for "Display Type" for which I can change to "Content Pane"

I'm sorry if I am missing something obvious

dawehner’s picture

You would have to create a new display.

matthewdolman’s picture

I create a new Display of type Page

Nowhere can I see the option for "Display Type"

Again, I'm sorry if I am being dense

dawehner’s picture

Then the question is, did this display type worked for you as expected?

esmerel’s picture

Can you give us a link to what you are seeing?

Anonymous’s picture

Category: bug » support

i'm having the same problem. i have made a view with 20 teasers per page, but when i choose ajax, i have to scroll to the top to see the first teasers of the next side. i know how to add contentpanes (adding a display on the top of the view/edit area), but thats not a solution for me...

any ideas?

thanks

konsul

aschiwi’s picture

Version: 7.x-3.0-rc1 » 7.x-3.0-rc3
Status: Postponed (maintainer needs more info) » Active
Issue tags: +dvcs11

To reproduce, create a View with a page display, set Ajax to yes and use a pager. You scroll down to the pager, hit page 2, it loads page 2, but stays at the bottom of the View. It doesn't matter whether it's a page display or a content pane on a Panels page.

I tested this in a brand new Drupal 7 install with 7.x-3.0-rc3. I tested in an existing Drupal 6 website, and it worked back then, going to page 2 scrolls the View back up.

aschiwi’s picture

There's another report of this at http://drupal.org/node/1209086 (which I marked as duplicate)

stBorchert’s picture

Status: Active » Needs review
FileSize
2.07 KB

Here is a small patch that re-implements the "scroll-top" behavior for AJAX pagers.

aschiwi’s picture

Patch in #13 works for me - fresh Drupal install, today's Views 7.x-3.x branch, enabled front page view, created some nodes and set front page view to Ajax. Using the pager now allows me to scroll up. Let's get at least one other opinion though before RTBC.

dawehner’s picture

Status: Needs review » Fixed

This patch looks really fine, so committed to 7.x-3.x

Saw this pager working directly

bryancasler’s picture

Woot! Thanks stBorchert.

Status: Fixed » Closed (fixed)

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

hachreak’s picture

Can we port this functionality for D6? :)