context menu can now be closed with right click, fixed css error on #app-content

This commit is contained in:
booploops 2021-12-15 23:55:06 -08:00
parent 98d697b211
commit 64a8529f65
2 changed files with 7 additions and 4 deletions

View file

@ -32,15 +32,18 @@ var CiderContextMenu = {
menu.classList.remove("context-menu-open"); menu.classList.remove("context-menu-open");
}, {once: true}); }, {once: true});
// when menubackground is clicked, remove it function close () {
menuBackground.addEventListener("click", function () {
menuBackground.style.pointerEvents = "none"; menuBackground.style.pointerEvents = "none";
menu.classList.add("context-menu-close"); menu.classList.add("context-menu-close");
menu.addEventListener("animationend", function () { menu.addEventListener("animationend", function () {
menuBackground.remove(); menuBackground.remove();
menu.remove(); menu.remove();
}, {once: true}); }, {once: true});
}); }
// when menubackground is clicked, remove it
menuBackground.addEventListener("click", close);
menuBackground.addEventListener("contextmenu", close);
// add menu to menuBackground // add menu to menuBackground
menuBackground.appendChild(menu); menuBackground.appendChild(menu);

View file

@ -210,7 +210,7 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
overflow-y: scroll; overflow-y: scroll;
overflow-y: overlay; overflow-y: overlay;
overflow-x: hidden; overflow-x: hidden;
border-radius: 10px 0px; border-radius: 10px 0px 0px 0px;
border-left: 1px solid rgb(0 0 0 / 25%); border-left: 1px solid rgb(0 0 0 / 25%);
border-top: 1px solid rgb(0 0 0 / 25%); border-top: 1px solid rgb(0 0 0 / 25%);
position: relative; position: relative;