Assorted SD fixes

This commit is contained in:
Cohee
2023-11-19 00:40:21 +02:00
parent b6936584fe
commit 53c3fc16c1
4 changed files with 39 additions and 45 deletions

View File

@ -365,10 +365,9 @@ function addExtensionsButtonAndMenu() {
});
$("html").on('touchstart mousedown', function (e) {
// let clickTarget = $(e.target);
if (dropdown.is(':visible')
/*&& clickTarget.closest(button).length == 0
&& clickTarget.closest(dropdown).length == 0*/) {
const clickTarget = $(e.target);
const noCloseTargets = ['#sd_gen'];
if (dropdown.is(':visible') && !noCloseTargets.some(id => clickTarget.closest(id).length > 0)) {
$(dropdown).fadeOut(animation_duration);
}
});