Fix modal overlay issue and improve modal structure

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
kbe
2025-09-16 08:44:21 +02:00
parent 4e06f91acb
commit 61ad8c64d4
2 changed files with 36 additions and 41 deletions

View File

@@ -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() {