diff --git a/components.js b/components.js index 7053ca9..97ee63f 100644 --- a/components.js +++ b/components.js @@ -1151,6 +1151,7 @@ customElements.define('sm-popup', class extends HTMLElement { this.focusable this.autoFocus this.mutationObserver + this.resizeObserver this.popupContainer = this.shadowRoot.querySelector('.popup-container'); this.backdrop = this.shadowRoot.querySelector('.background'); @@ -1383,7 +1384,7 @@ customElements.define('sm-popup', class extends HTMLElement { } }); - const resizeObserver = new ResizeObserver(entries => { + this.resizeObserver = new ResizeObserver(entries => { for (let entry of entries) { if (entry.contentBoxSize) { // Firefox implements `contentBoxSize` as a single content rect, rather than an array @@ -1406,7 +1407,7 @@ customElements.define('sm-popup', class extends HTMLElement { } disconnectedCallback() { this.removeEventListener('keydown', this.detectFocus); - resizeObserver.unobserve(); + this.resizeObserver.unobserve(); this.mutationObserver.disconnect() this.popupHeader.removeEventListener('touchstart', this.handleTouchStart, { passive: true }); } diff --git a/index.html b/index.html index 0d464aa..05a7a69 100644 --- a/index.html +++ b/index.html @@ -2241,7 +2241,6 @@ floGlobals.appObjects.adminData.articleVotes[articleIDs[index]].votes = {} } articleVotes.forEach(vote => { - console.log(vote) const { senderID, message, type, vectorClock, time } = vote; const { voteCount } = floCloudAPI.util.decodeMessage(message) const { votes } = floGlobals.appObjects.adminData.articleVotes[articleIDs[index]];