Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
RezenkovD committed Aug 14, 2023
1 parent 288b8c1 commit ce36607
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vr_club_site/templates/site/js/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ document.addEventListener("DOMContentLoaded", function () {
prevMonthBtn.addEventListener("click", prevMonth);
nextMonthBtn.addEventListener("click", nextMonth);
});

var popupScrollPosition;
function openPopup(day, month, year) {
popupScrollPosition = window.scrollY;
const dateDiv = document.querySelector('.booking-date');
const monthsNames = [
"січня",
Expand Down Expand Up @@ -157,6 +158,7 @@ function closePopup() {
const body = document.querySelector('body');
popup.style.display = 'none';
body.style.overflow = 'auto';
window.scrollTo(0, popupScrollPosition);
}

window.addEventListener('popstate', function(event) {
Expand Down

0 comments on commit ce36607

Please sign in to comment.