Right click long press menu completed

This commit is contained in:
Pax1601
2023-08-30 09:10:42 +02:00
parent 85bdd791b8
commit a10c113c42
2 changed files with 65 additions and 61 deletions

View File

@@ -14,13 +14,9 @@ export class Dropdown {
this.#defaultValue = this.#value.innerText;
this.#callback = callback;
if (options != null) {
this.setOptions(options);
}
if (options != null) this.setOptions(options);
this.#value.addEventListener("click", (ev) => {
this.#toggle();
});
this.#value.addEventListener("click", (ev) => { this.#toggle(); });
document.addEventListener("click", (ev) => {
if (!(this.#value.contains(ev.target as Node) || this.#options.contains(ev.target as Node) || this.#element.contains(ev.target as Node))) {