#48866 closed defect (bug) (fixed)
TwentyTwenty: Paginated comments don't work
Reported by: | andraganescu | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3.1 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Bundled Theme | Keywords: | has-patch needs-testing has-dev-note |
Focuses: | javascript | Cc: |
Description (last modified by )
While investigating #41390 I tried testing as described using the new default theme TwentyTwenty:
The "Other comment settings" section can be found under Settings > Discussion.
Steps to reproduce:
Break comments into pages with 3 top level comments per page and the last page displayed by default. > Comments should be displayed with the newer comments at the top of each page
Go to a post which already has more than, say, 10 comments
Navigate to the previous comments using the comment pagination
... and found that when clicking "Previous comments" nothing happened.
Simply switching themes to Twenty Nineteen solved the issue.
Attachments (2)
Change History (14)
This ticket was mentioned in Slack in #themereview by joyously. View the logs.
5 years ago
#2
@
5 years ago
- Component changed from Themes to Bundled Theme
- Summary changed from Paginated comments don't work in TwentyTwenty to TwentyTwenty: Paginated comments don't work
#3
@
5 years ago
It's a JS "issue" regarding smoothScroll
. You can test by commenting out this line: https://github.com/WordPress/twentytwenty/blob/master/assets/js/index.js#L745
A solution would be to add a || -1 !== element.href.search( '#comments' )
on this line:
https://github.com/WordPress/twentytwenty/blob/master/assets/js/index.js#L341
#6
@
5 years ago
- Keywords has-patch needs-testing added; needs-patch removed
If we remove comments id from the parent DIV then it will fix the issue.
#7
@
5 years ago
@mukesh27 removing that makes for bad ux. When I click a post's comments link (eg: from the index page) I expect it to point me (scroll to) the post's comment section.
The solution is the JS I mentioned...
#8
@
5 years ago
- Focuses javascript added
- Version set to 5.3
New patch as per the above comments. Tested in my environment and works fine.
It would be nice if we milestone this to 5.3.1.
#9
@
5 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 46824:
#12
@
5 years ago
- Keywords has-dev-note added
Dev note published on Make/Core: https://make.wordpress.org/core/2019/12/08/twenty-twenty-animated-scroll-changes-in-wordpress-5-3-1/
It appears to be jumping to the in-page anchor instead of navigating to the other page of comments. (caught by JS?)