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.
Title says it all.
Otherwise this feels kind of uncanny: when you've scrolled far down and then click a link which leads you to a page that also contains a lot of content, you'll be equally far down on that new page as you were on the previous page. This allows the user to clearly feel something is off. We don't want that.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2713499-3.patch | 1.08 KB | Wim Leers |
Comments
Comment #2
Wim LeersComment #3
Wim LeersComment #4
Wim LeersThis change is necessary due to different behaviors in different browsers:
location.assign()
(perhaps intentionally, perhaps due to a race condition, who knows)Therefore I had to resort to manual scrolling for this. Fortunately we have a good API for just that.
Comment #5
Wim LeersComment #6
Wim LeersNow that we have manual scrolling in place, and it turns out to be trivial, we might as well do that when navigating to a fragment on the current page too, because that'd allow us to remove our
onhashchange
event handler. Let's do that in a follow-up.Comment #7
Wim Leers