Commit 3f8e967a by Etienne Freiss

Merge branch '2386-fix-scroll-reloads-calendar' into 'dev_cooperatic'

only apply func on resize in a width threshold is passed

See merge request !132
parents 41c352f2 df7d1ea1
Pipeline #1885 passed with stage
in 1 minute 30 seconds
......@@ -630,7 +630,17 @@ function init_shifts_exchange() {
}
$(window).smartresize(function() {
vw = window.innerWidth;
init_calendar_page();
// only apply if a width threshold is passed
if (
vw > 992 && window.innerWidth <= 992 ||
vw <= 992 && window.innerWidth > 992 ||
vw > 768 && window.innerWidth <= 768 ||
vw <= 768 && window.innerWidth > 768
) {
vw = window.innerWidth;
init_calendar_page();
} else {
vw = window.innerWidth;
}
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment