diff --git a/bookwyrm/static/js/bookwyrm.js b/bookwyrm/static/js/bookwyrm.js index 6d21c207f..aa9c9cdc6 100644 --- a/bookwyrm/static/js/bookwyrm.js +++ b/bookwyrm/static/js/bookwyrm.js @@ -427,6 +427,8 @@ let BookWyrm = new (class { // Helper functions function handleModalOpen(modalElement) { + event.preventDefault(); + htmlElement.classList.add("is-clipped"); modalElement.classList.add("is-active"); modalElement.getElementsByClassName("modal-card")[0].focus(); diff --git a/bookwyrm/templates/author/sync_modal.html b/bookwyrm/templates/author/sync_modal.html index f171e9650..a6e032cbf 100644 --- a/bookwyrm/templates/author/sync_modal.html +++ b/bookwyrm/templates/author/sync_modal.html @@ -1,4 +1,4 @@ -{% extends 'components/new_modal.html' %} +{% extends 'components/modal.html' %} {% load i18n %} {% block modal-title %} diff --git a/bookwyrm/templates/book/cover_add_modal.html b/bookwyrm/templates/book/cover_add_modal.html index 855e52f4a..e8207ff44 100644 --- a/bookwyrm/templates/book/cover_add_modal.html +++ b/bookwyrm/templates/book/cover_add_modal.html @@ -1,4 +1,4 @@ -{% extends 'components/new_modal.html' %} +{% extends 'components/modal.html' %} {% load i18n %} {% block modal-title %} diff --git a/bookwyrm/templates/book/delete_readthrough_modal.html b/bookwyrm/templates/book/delete_readthrough_modal.html index 217d96d8a..5b3a74cc5 100644 --- a/bookwyrm/templates/book/delete_readthrough_modal.html +++ b/bookwyrm/templates/book/delete_readthrough_modal.html @@ -1,4 +1,4 @@ -{% extends 'components/new_modal.html' %} +{% extends 'components/modal.html' %} {% load i18n %} {% block modal-title %}{% trans "Delete these read dates?" %}{% endblock %} diff --git a/bookwyrm/templates/book/sync_modal.html b/bookwyrm/templates/book/sync_modal.html index b0a8cf48e..6e5df0c0f 100644 --- a/bookwyrm/templates/book/sync_modal.html +++ b/bookwyrm/templates/book/sync_modal.html @@ -1,4 +1,4 @@ -{% extends 'components/new_modal.html' %} +{% extends 'components/modal.html' %} {% load i18n %} {% block modal-title %} diff --git a/bookwyrm/templates/components/modal.html b/bookwyrm/templates/components/modal.html index 2eabd2e2b..3e1cc759b 100644 --- a/bookwyrm/templates/components/modal.html +++ b/bookwyrm/templates/components/modal.html @@ -1,40 +1,33 @@ {% load i18n %} -