Skip to content

Support click handler on <b-overlay /> shade. #5243

@viglucci

Description

@viglucci

Is your feature request related to a problem? Please describe...

I am looking for a way to be able to trigger a callback when a <b-overlay /> is clicked. This is useful when using the overlay to cover the entire screen to have the user focus on a specific piece of content.

Describe the solution you'd like

I would like to be able to add a click handler to the overlay using @click="...".

<b-overlay
    @click="closeOverlay"
>
    ...
</b-overlay>

Describe alternatives you've considered

I've considered adding a close button to the content shown in the overlay, however it is a common UX pattern to allow a user to close an overlay by clicking on the shaded portion.

Additional context

I'm new to Vue so adding such a click handler may already be supported without changes to the library. Please let me know if this is possible, thanks :).

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