Use data-attributes to define close triggers

Created on 6 September 2023, 10 months ago

Problem/Motivation

Currently, the javascript selects the modal footer and modal background as hardcoded close triggers.
However, there are several cases where users want to add custom triggers or add other elements (such as links) to the footer. While the links will work, the modal will close, too.

Steps to reproduce

Proposed resolution

Use a data-attribute (data-ouibounce-close with querySelectorAll() to get all close triggers.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Needs review

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024