Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2012 at 21:50 UTC
Updated:
9 Oct 2017 at 09:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wjaspers commentedFound and modified all the code i think is necessary to accomplish this. Patch OTW.
Comment #2
wjaspers commentedHere's a patch. This should cover all necessities, and falls back to the default scrolling behavior if the option hasn't been used before. Will not tag for Backport to 7.x until it has been reviewed.
Comment #3
wjaspers commentedComment #4
hachreak commented+1.
Also I need to resolve this "bug"... XD
Comment #5
jcisio commentedJust a note that in D7 this behavior is already optional as it can be removed using hook_views_ajax_data_alter() to unset the scroll command (which was introduced in #1233334: Scroll to the top of a view after pager page load).
Comment #6
hachreak commentedCan we port this functionality for D6? :)
Comment #7
dawehnerAre you sure it make sense to set this as definition for display plugins. Isn't it enough to have a setting?
In general the point of jcisio is also strong.
Comment #8
wjaspers commented@dawehner,
My original patch set that definition so the default value would continue to "scroll to top".
If this patch were rolled-in, it prevents existing views definitions from getting goofed up.
Comment #9
manuel garcia commentedJust for people looking to solve this right away:
Will remove the scroll to top behaviour for all views_load_more pager enabled views.
Comment #10
adamgerthel commented@Manuel just tried you solution (in template.php though) and it didn't work for me. I only have this issue in iOS (mobile safari) though
Edit: Solved. We were running the following script in behaviors (causing it to get triggered on all ajax requests):
Comment #11
wjaspers commented@AdamGerthel,
@Manuel's solution shouldn't be placed in your template.php. It should exist in your own module for the site.
Comment #12
funature commentedpatch of #9 used, but still scroll to top.
Comment #13
jcisio commented#9 is for D7. The only patch to test is #2, but it's NW because of #7.
Comment #14
wjaspers commentedI set that so older views aren't inadvertently affected by this change.
By making the display plugin default "will_scroll_top" TRUE, they maintain their original behavior.
Comment #15
krisrobinson commentedApplied patch from #2 to views 6.x-3.0 (2012-Jan-04) and it worked fine, new setting available in views to enable/disable scroll to top. No errors so far, works good with views_load_more.
Comment #16
mustanggb commented