Skip to content

ClickOutsideToClose when using ComponentΒ #2

@asoyfer

Description

@asoyfer

Hi Trey,

Thanks for extending this module to work with components!

I noticed that ClickOutsideToClose does not work if the item is a component. It looks like that's because the div with the .ril-current-image class is not receiving a width when the child is not an image and as a result is taking up 100%, preventing the user from clicking outside the media visible to close the Lightbox. You can see an example of this in your demo, when viewing the YT iframe slide.

Would it be possible to fix this by automatically detecting the width of the child component's parent element or somehow passing it in when the child is not an image?

I guess the alternative would be to set some width smaller than 100% on the class in CSS to always have some room around the media.

Thanks,
Anatoly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions