diff --git a/bookwyrm/static/js/status_cache.js b/bookwyrm/static/js/status_cache.js index 10ab18f9f..ee563a153 100644 --- a/bookwyrm/static/js/status_cache.js +++ b/bookwyrm/static/js/status_cache.js @@ -74,6 +74,12 @@ let StatusCache = new class { .forEach(node => window.localStorage.removeItem(node.dataset.cacheDraft)); // Close modals + let modal = form.closest(".modal.is-active"); + if (!!modal) { + modal.getElementsByClassName("modal-close")[0].click(); + } + + // Update buttons } }(); diff --git a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html index 3a0346931..b041b70aa 100644 --- a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html +++ b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html @@ -9,7 +9,7 @@ Finish "{{ book_title }}" {% endblock %} {% block modal-form-open %} -