ssb: Oops, that event was Firefox-specific.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m36s

This commit is contained in:
Cory McWilliams 2025-04-07 22:35:40 -04:00
parent dd3b2656ad
commit 20100d3fd4
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🦀", "emoji": "🦀",
"previous": "&n4BDWGMwfagmlsWupwzKvYGLu6X6oYbtgdFvHP6JmZU=.sha256" "previous": "&VvfYCIWHlYDtlgOBhDByg1l9rt8NIRt/TCurKx2/AWE=.sha256"
} }

View File

@ -36,17 +36,17 @@ class TfMessageElement extends LitElement {
connectedCallback() { connectedCallback() {
super.connectedCallback(); super.connectedCallback();
this._click_callback = this.document_click.bind(this); this._click_callback = this.document_click.bind(this);
document.body.addEventListener('mousedown', this._click_callback); document.body.addEventListener('mouseup', this._click_callback);
} }
disconnectedCallback() { disconnectedCallback() {
super.disconnectedCallback(); super.disconnectedCallback();
document.body.removeEventListener('mousedown', this._click_callback); document.body.removeEventListener('mouseup', this._click_callback);
} }
document_click(event) { document_click(event) {
let content = this.renderRoot.querySelector('.w3-dropdown-content'); let content = this.renderRoot.querySelector('.w3-dropdown-content');
let target = event.originalTarget; let target = event.target;
if (content && !content.contains(target)) if (content && !content.contains(target))
{ {
content.classList.remove('w3-show'); content.classList.remove('w3-show');