bug fix
This commit is contained in:
parent
f65a6322cb
commit
aa1382d145
@ -1151,6 +1151,7 @@ customElements.define('sm-popup', class extends HTMLElement {
|
|||||||
this.focusable
|
this.focusable
|
||||||
this.autoFocus
|
this.autoFocus
|
||||||
this.mutationObserver
|
this.mutationObserver
|
||||||
|
this.resizeObserver
|
||||||
|
|
||||||
this.popupContainer = this.shadowRoot.querySelector('.popup-container');
|
this.popupContainer = this.shadowRoot.querySelector('.popup-container');
|
||||||
this.backdrop = this.shadowRoot.querySelector('.background');
|
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) {
|
for (let entry of entries) {
|
||||||
if (entry.contentBoxSize) {
|
if (entry.contentBoxSize) {
|
||||||
// Firefox implements `contentBoxSize` as a single content rect, rather than an array
|
// Firefox implements `contentBoxSize` as a single content rect, rather than an array
|
||||||
@ -1406,7 +1407,7 @@ customElements.define('sm-popup', class extends HTMLElement {
|
|||||||
}
|
}
|
||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
this.removeEventListener('keydown', this.detectFocus);
|
this.removeEventListener('keydown', this.detectFocus);
|
||||||
resizeObserver.unobserve();
|
this.resizeObserver.unobserve();
|
||||||
this.mutationObserver.disconnect()
|
this.mutationObserver.disconnect()
|
||||||
this.popupHeader.removeEventListener('touchstart', this.handleTouchStart, { passive: true });
|
this.popupHeader.removeEventListener('touchstart', this.handleTouchStart, { passive: true });
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2241,7 +2241,6 @@
|
|||||||
floGlobals.appObjects.adminData.articleVotes[articleIDs[index]].votes = {}
|
floGlobals.appObjects.adminData.articleVotes[articleIDs[index]].votes = {}
|
||||||
}
|
}
|
||||||
articleVotes.forEach(vote => {
|
articleVotes.forEach(vote => {
|
||||||
console.log(vote)
|
|
||||||
const { senderID, message, type, vectorClock, time } = vote;
|
const { senderID, message, type, vectorClock, time } = vote;
|
||||||
const { voteCount } = floCloudAPI.util.decodeMessage(message)
|
const { voteCount } = floCloudAPI.util.decodeMessage(message)
|
||||||
const { votes } = floGlobals.appObjects.adminData.articleVotes[articleIDs[index]];
|
const { votes } = floGlobals.appObjects.adminData.articleVotes[articleIDs[index]];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user