Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

widgets: domAttachTo isn't invoked if the template file is completely empty #482

@alex3683

Description

@alex3683

If the template file for a widget exists but is completely empty (no space / no newline), the domAttachTo method of an adapter instance isn't invoked. For widgets using a view technology this isn't really a problem, since an empty template file is a real exception and probably doesn't happen at all. On the other side a plain widget might have an empty template file very often, since often the DOM tree is build manually and rendered from within the controller. In case of an empty template file the onDomAvailable hook is never called and hence initial rendering isn't possible. A workaround is either to add some whitespace (space or newline) or a HTML comment.

Expected:
domAttachTo should always be called for widgets (at least in case the template file exists), even if only an empty text node would be attached.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions