diff --git a/public/viewjs/calendar.js b/public/viewjs/calendar.js index e4507295..3c9c74d2 100644 --- a/public/viewjs/calendar.js +++ b/public/viewjs/calendar.js @@ -44,7 +44,7 @@ $("#ical-button").on("click", function(e) ); }); -$(window).on("resize", function() +$(window).one("resize", function() { // Automatically switch the calendar to "basicDay" view on small screens // and to "month" otherwise diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 2e8ff1c6..9674d0aa 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -751,7 +751,7 @@ $(document).on("click", ".recipe-popup-button", function(e) ); }); -$(window).on("resize", function() +$(window).one("resize", function() { // Automatically switch the calendar to "basicDay" view on small screens // and to "basicWeek" otherwise