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.
Problem/Motivation
In order to access the displace properties we should use Drupal.displace as an object so instead use Drupal.displace().top
we should use Drupal.displace.offsets.top
.
Proposed resolution
Replace all occurrences of Drupal.displace().top by Drupal.displace.offsets.top.
Remaining tasks
N/A
User interface changes
N/A
API changes
N/A
Related Issues
N/A
Comment | File | Size | Author |
---|---|---|---|
drupal-displace-fix.patch | 659 bytes | rteijeiro | |
Comments
Comment #1
Wim LeersNote: I introduced this apparently incorrect use of
Drupal.displace
in #1991684: Node history markers (comment & node "new" indicator, "x new comments" links) forces render caching to be per user. My bad!I did manual testing of this patch, and this indeed continues to work correctly.
Thanks, rteijeiro!
Comment #2
nod_Well it's not incorrect per-say, it's just less efficient :)
Comment #3
nod_and it'd be nice if we fixed that in a more generic way: #1870006: HTML5 validation with table sticky header is misaligned over the toolbar
Comment #4
Wim Leers#3: agreed, but the comment "new" indicator and accompanying
#new
fragment are a special case: the#new
fragment is inserted dynamically, since #1991684: Node history markers (comment & node "new" indicator, "x new comments" links) forces render caching to be per user, to not break the render cache. In any case, I support that principle, and threw a review your way :)Comment #5
jessebeach CreditAttribution: jessebeach commentedLooks good.
Comment #6
Xanodrupal-displace-fix.patch queued for re-testing.
Comment #7
catchCommitted/pushed to 8.x, thanks!