You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After Upgrading from 1.0.0beta2 to beta3 or rc1 it is no longer possible to dismiss a modal with data-te-modal-dismiss.
As the Modals are shown programatically there is no data-te-toggle button. In the code the enableDismissTrigger function within the modal-component init has been removed. The overall init function just uses the data-te-toggle selector.
As soon as a button with data-te-toggle="modal" exists the dismiss trigger works again.
To Reproduce
follow the examples in documentation. This works fine.
Remove the button with data-te-toggle="modal" and the data-te-target="#id".
Reload the page.
Open the page programatically. Modal will be shown. But closing based on the dismiss-trigger not working.
Expected behavior
A modal should be closable from inside with data-te-modal-dismiss either if it is toggle by button or opened programatically.
Actual behavior
data-te-modal-dismiss only working if not using programatically modal opening.
Show your code
The following code is used (ES) to open the modal:
window.openModal = (id) => {
const el = document.getElementById(id)
if (typeof el != 'undefined' && el !== null) {
let modal = Modal.getInstance(el)
if (modal === null) {
modal = new Modal(el, {})
}
modal.show()
}
}
Desktop (please complete the following information):
OS: Windows
Browser Chrome One
Version 101.0.4843.43
Make sure it is indeed an issue/bug report
Without the data-te-toggle-button only two click-listeners are registered to the dismiss-button. As soon as the toggle button is on the page 6 listeners are registered including the dismiss.te.modal uidEvent.
The text was updated successfully, but these errors were encountered:
Describe the bug
After Upgrading from 1.0.0beta2 to beta3 or rc1 it is no longer possible to dismiss a modal with data-te-modal-dismiss.
As the Modals are shown programatically there is no data-te-toggle button. In the code the enableDismissTrigger function within the modal-component init has been removed. The overall init function just uses the data-te-toggle selector.
As soon as a button with data-te-toggle="modal" exists the dismiss trigger works again.
To Reproduce
follow the examples in documentation. This works fine.
Remove the button with data-te-toggle="modal" and the data-te-target="#id".
Reload the page.
Open the page programatically. Modal will be shown. But closing based on the dismiss-trigger not working.
Expected behavior
A modal should be closable from inside with data-te-modal-dismiss either if it is toggle by button or opened programatically.
Actual behavior
data-te-modal-dismiss only working if not using programatically modal opening.
Show your code
The following code is used (ES) to open the modal:
window.openModal = (id) => {
const el = document.getElementById(id)
if (typeof el != 'undefined' && el !== null) {
let modal = Modal.getInstance(el)
if (modal === null) {
modal = new Modal(el, {})
}
modal.show()
}
}
Desktop (please complete the following information):
Make sure it is indeed an issue/bug report
Without the data-te-toggle-button only two click-listeners are registered to the dismiss-button. As soon as the toggle button is on the page 6 listeners are registered including the dismiss.te.modal uidEvent.
The text was updated successfully, but these errors were encountered: