From dfdd75622652517fad92382f687d4d1a2e031c8b Mon Sep 17 00:00:00 2001 From: Martijn van de Rijdt Date: Wed, 24 May 2023 16:40:01 -0400 Subject: [PATCH] fixed: readonly status message is replaced by saved/failed-to-save message though both should be shown, #677 --- public/js/src/module/field-submission-queue.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/src/module/field-submission-queue.js b/public/js/src/module/field-submission-queue.js index e9b0f356..f98f776e 100644 --- a/public/js/src/module/field-submission-queue.js +++ b/public/js/src/module/field-submission-queue.js @@ -38,9 +38,12 @@ class FieldSubmissionQueue { */ this._uploadStatus = { init() { + const statusElementSelector = + '.fieldsubmission-status:not(.readonly)'; this.statusElements = document.querySelectorAll( - '.fieldsubmission-status' + statusElementSelector ); + if (!this.statusElements.length) { const range = document.createRange(); const first = range.createContextualFragment( @@ -58,7 +61,7 @@ class FieldSubmissionQueue { formFooter.prepend(second); } this.statusElements = document.querySelectorAll( - '.fieldsubmission-status' + statusElementSelector ); } },