Fix modal overlay issue and improve modal structure
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -9,13 +9,6 @@ export default class extends Controller {
|
||||
connect() {
|
||||
// Get modal element from the document
|
||||
this.modalElement = document.querySelector('[data-event-duplication-target="modal"]')
|
||||
|
||||
// Close modal when clicking outside
|
||||
this.modalElement.addEventListener('click', (event) => {
|
||||
if (event.target === this.modalElement) {
|
||||
this.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
open() {
|
||||
|
||||
Reference in New Issue
Block a user