Skip to content

Add overlay info to Vaadin Overlay Closed event. #10209

@abdullahtellioglu

Description

@abdullahtellioglu

Describe your motivation

vaadin-overlay-open event has the overlay itself in detail, which can be accessible via const { overlay } = (e as CustomEvent).detail;. However, the same info is not present for vaadin-overlay-closed event.

This is problematic for us because we use an internal array to keep track of which overlays are opened. We know which overlay is opened but we do not know when it is closed. We have a single event listener that is added to document.body, so we cannot possibly know target overlays.

Describe the solution you'd like

It would be nice to have the same information in all events that are dispatched from vaadin-overlay-mixin, such as vaadin-overlay-closed, vaadin-overlay-closing, and others.

Describe alternatives you've considered

A possible solution for this would be registering an event listener when the open event is invoked; however, such a solution may create a memory leak and hanging events if not properly handled.

Additional context

No response

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