Skip to content

rendered event is triggered even though content has not changed #5377

@nilmerg

Description

@nilmerg

Describe the bug

An event listener for the rendered event might get called even though the container it is working with did not change.

This is a result of at least two causes:

  • A container for which autorefresh is active, but suspended using data-suspend-autorefresh
  • A behavior with a renderHook decides to discard an update (e.g. form.js)

To Reproduce

Focus a form element in a container or interact with something that suspends autorefresh.
Have a rendered event listener that expects only raw content.

Expected behavior

A rendered event is usually used to finalize content. If content did not change, it should not be triggered.

Additional context

This is one of those bugs in our javascript, that might not be easy to fix. Maybe there's a listener out there which wants to be triggered in this case? I don't really mind thirdparty code, but didn't check any of our own. It's a breaking change anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/javascriptAffects the javascript framework

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions