Merge pull request #1370 from AssassinJN/patch-6

change event trigger to mousedown
This commit is contained in:
cmdr2 2023-06-27 19:27:28 +05:30 committed by GitHub
commit c425811b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,7 +400,7 @@ function loadCustomModifiers() {
}
function showModifierContainer() {
document.addEventListener("click", checkIfClickedOutsideDropdownElem)
document.addEventListener("mousedown", checkIfClickedOutsideDropdownElem)
modifierDropdown.dataset.active = true
editorModifiersContainer.classList.add("active")
@ -565,7 +565,7 @@ modifierSettingsCloseBtn.addEventListener("click", (e) => {
modifierSettingsDialog.close()
})
modifierSettingsDialog.addEventListener('click', function (event) {
modifierSettingsDialog.addEventListener('mousedown', function (event) {
var rect = modifierSettingsDialog.getBoundingClientRect();
var isInDialog=(rect.top <= event.clientY && event.clientY <= rect.top + rect.height
&& rect.left <= event.clientX && event.clientX <= rect.left + rect.width);