Currently, if a view is ajax-ified, it tries to scroll the body object so that the top of the view is viewable. This means that if the view is embedded inside of a popup, it will scroll the body instead of the popup container. This patch searches for the first element containing the view that needs scrolling, and scrolls that instead.

This is also an issue in the 2.x branch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

I would like some testing to ensure this doesn't break anything? It looks ok to me, I'd just like to be sure.

deviantintegral’s picture

For anyone wanting some steps to test this issue:

  1. Create a view with a reasonable amount of content; all nodes or users should be simple enough.
  2. Enable the pager for the view, and ensure that the view when loaded will have more than one page.
  3. Enable AJAX loading for the view.
  4. Install the popups module. Alternative modules for overlays should work as well, though this is the one I used at the time.
  5. Popup-enable a link to the view. This is probably best done by enabling the popups module on all pages in it's settings, and creating a link such as:<a href="/path/to/view" class="popups">View in popup link</a>
  6. Use the pager in the view while it is rendered in an overlay. Best seen if you scroll down the page a few paragraphs before activating the popup.
merlinofchaos’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs review » Patch (to be ported)

Committed to 6.x-2.x and 3.x.

dawehner’s picture

Status: Patch (to be ported) » Needs review
FileSize
2.12 KB

Here is a patch, It would be cool if someone reviews it, i'm not sure how to reproduce it.

dawehner’s picture

Status: Needs review » Fixed

and fixed

Status: Fixed » Closed (fixed)

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