diff --git a/bookwyrm/static/js/bookwyrm.js b/bookwyrm/static/js/bookwyrm.js index 4d54b7232..db6be3f7f 100644 --- a/bookwyrm/static/js/bookwyrm.js +++ b/bookwyrm/static/js/bookwyrm.js @@ -138,10 +138,10 @@ let BookWyrm = new class { * @return {undefined} */ toggleAction(event) { - if (event.currentTarget == event.target) { + let trigger = event.currentTarget; + if (!trigger.dataset.allowDefault || event.currentTarget == event.target) { event.preventDefault(); } - let trigger = event.currentTarget; let pressed = trigger.getAttribute('aria-pressed') === 'false'; let targetId = trigger.dataset.controls; diff --git a/bookwyrm/templates/snippets/reading_modals/layout.html b/bookwyrm/templates/snippets/reading_modals/layout.html index 00e453350..0f5dedb0a 100644 --- a/bookwyrm/templates/snippets/reading_modals/layout.html +++ b/bookwyrm/templates/snippets/reading_modals/layout.html @@ -8,7 +8,7 @@ {% with 0|uuid as local_uuid %} <div class="is-flex is-justify-content-space-between"> - <label for="post_status_{{ local_uuid }}_{{ uuid }}" data-controls="reading_content_{{ local_uuid }}_{{ uuid }}" data-controls-checkbox="post_status_{{ local_uuid }}_{{ uuid }}" data-disables="reading_content_fieldset_{{ local_uuid }}_{{ uuid }}" aria-pressed="true"> + <label for="post_status_{{ local_uuid }}_{{ uuid }}" data-controls="reading_content_{{ local_uuid }}_{{ uuid }}" data-controls-checkbox="post_status_{{ local_uuid }}_{{ uuid }}" data-disables="reading_content_fieldset_{{ local_uuid }}_{{ uuid }}" aria-pressed="true" data-allow-default="true"> <input type="checkbox" name="post-status" class="checkbox" id="post_status_{{ local_uuid }}_{{ uuid }}" checked> {% trans "Post to feed" %} </label>