Opened 5 years ago
Closed 5 years ago
#47706 closed defect (bug) (fixed)
Typo in comments reply observer, new comments don't get events attached
Reported by: | maguiar | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Comments | Keywords: | has-patch needs-testing |
Focuses: | javascript | Cc: |
Description
There's a typo in the comment's reply link observer. It's supposed to observe DOM changes inside body
so it can attach the reply link event to new nodes. However, Core has it written as:
var observerOptions = { childList: true, subTree: true };
subTree
should be subtree
. Because of this new comments added with ajax don't get the event attached to them, and the reply link directs instead to whatever the reply link points to. While the rest of comments open the reply form below the comment.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
For reference, here's the
subtree
documentation: https://developer.mozilla.org/en-US/docs/Web/API/MutationObserverInit/subtree