Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | ajax_views_scroll_target.patch | 2.12 KB | dawehner |
ajax_views_scroll_target.patch | 1.49 KB | deviantintegral | |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedI would like some testing to ensure this doesn't break anything? It looks ok to me, I'd just like to be sure.
Comment #2
deviantintegral CreditAttribution: deviantintegral commentedFor anyone wanting some steps to test this issue:
<a href="/path/to/view" class="popups">View in popup link</a>
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to 6.x-2.x and 3.x.
Comment #4
dawehnerHere is a patch, It would be cool if someone reviews it, i'm not sure how to reproduce it.
Comment #5
dawehnerand fixed