Allow new_content JS event listeners access to the actual new content

Created on 29 September 2020, about 4 years ago
Updated 23 June 2023, over 1 year ago

Problem/Motivation

Currently a cloned element is given to the event listeners of the views_infinite_scroll.new_content event. This unnecessarily restricts them from only running code on the newly added content.

Or in my use case, I wanted to move focus to the first new element if the pager had keyboard focus.

Steps to reproduce

Proposed resolution

Instead of exposing a cloned element, just expose the actual dom element.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024