Adds preventDefault to modal js

This commit is contained in:
Mouse Reeve 2021-12-30 19:09:03 -08:00
parent 8ad75084de
commit ed93eda18d

View file

@ -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();