mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-08 23:44:39 +02:00
Download dialog redesign, code cleanup
This commit is contained in:
@ -1055,3 +1055,14 @@ async function deleteKeys(keyToDelete) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function modalDialogCloseOnBackdropClick(dialog) {
|
||||
dialog.addEventListener('mousedown', function (event) {
|
||||
var rect = dialog.getBoundingClientRect()
|
||||
var isInDialog=(rect.top <= event.clientY && event.clientY <= rect.top + rect.height
|
||||
&& rect.left <= event.clientX && event.clientX <= rect.left + rect.width)
|
||||
if (!isInDialog) {
|
||||
dialog.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user