forked from extern/easydiffusion
Merge pull request #1370 from AssassinJN/patch-6
change event trigger to mousedown
This commit is contained in:
commit
c425811b45
@ -400,7 +400,7 @@ function loadCustomModifiers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showModifierContainer() {
|
function showModifierContainer() {
|
||||||
document.addEventListener("click", checkIfClickedOutsideDropdownElem)
|
document.addEventListener("mousedown", checkIfClickedOutsideDropdownElem)
|
||||||
|
|
||||||
modifierDropdown.dataset.active = true
|
modifierDropdown.dataset.active = true
|
||||||
editorModifiersContainer.classList.add("active")
|
editorModifiersContainer.classList.add("active")
|
||||||
@ -565,7 +565,7 @@ modifierSettingsCloseBtn.addEventListener("click", (e) => {
|
|||||||
modifierSettingsDialog.close()
|
modifierSettingsDialog.close()
|
||||||
})
|
})
|
||||||
|
|
||||||
modifierSettingsDialog.addEventListener('click', function (event) {
|
modifierSettingsDialog.addEventListener('mousedown', function (event) {
|
||||||
var rect = modifierSettingsDialog.getBoundingClientRect();
|
var rect = modifierSettingsDialog.getBoundingClientRect();
|
||||||
var isInDialog=(rect.top <= event.clientY && event.clientY <= rect.top + rect.height
|
var isInDialog=(rect.top <= event.clientY && event.clientY <= rect.top + rect.height
|
||||||
&& rect.left <= event.clientX && event.clientX <= rect.left + rect.width);
|
&& rect.left <= event.clientX && event.clientX <= rect.left + rect.width);
|
||||||
|
Loading…
Reference in New Issue
Block a user