diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 07fe31b0..452b8d94 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -13,7 +13,7 @@ VERSION = "0.0.1" PAGE_LENGTH = env("PAGE_LENGTH", 15) DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English") -JS_CACHE = "18443742" +JS_CACHE = "e5832a26" # email EMAIL_BACKEND = env("EMAIL_BACKEND", "django.core.mail.backends.smtp.EmailBackend") diff --git a/bookwyrm/static/js/status_cache.js b/bookwyrm/static/js/status_cache.js index a6eaf034..b3e345b1 100644 --- a/bookwyrm/static/js/status_cache.js +++ b/bookwyrm/static/js/status_cache.js @@ -64,9 +64,21 @@ let StatusCache = new class { * @return {undefined} */ submitStatus(event) { - event.preventDefault(); const form = event.currentTarget; - const trigger = event.submitter; + let trigger = event.submitter; + + // Safari doesn't understand "submitter" + if (!trigger) { + trigger = event.currentTarget.querySelector("button[type=submit]"); + } + + // This allows the form to submit in the old fashioned way if there's a problem + + if (!trigger || !form) { + return; + } + + event.preventDefault(); BookWyrm.addRemoveClass(form, 'is-processing', true); trigger.setAttribute('disabled', null);