diff --git a/index.html b/index.html
index 62f6e91..5446849 100644
--- a/index.html
+++ b/index.html
@@ -191,6 +191,7 @@
Contact
var reduceMotion = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
var scrollDebounce = null;
var lastScrollIndex = -1;
+ var suppressProgrammaticScrollSync = false;
function indexFromCenter() {
if (!carousel) return 0;
@@ -251,6 +252,7 @@ Contact
}
if (!fromScroll) {
+ suppressProgrammaticScrollSync = true;
scrollTabToCenter(index);
}
@@ -264,6 +266,10 @@ Contact
if (scrollDebounce) clearTimeout(scrollDebounce);
scrollDebounce = setTimeout(function () {
scrollDebounce = null;
+ if (suppressProgrammaticScrollSync) {
+ suppressProgrammaticScrollSync = false;
+ return;
+ }
var idx = indexFromCenter();
if (idx === lastScrollIndex) return;
setActive(idx, false, true);
@@ -314,7 +320,7 @@ Contact
tabs.forEach(function (t, i) {
if (t.classList.contains('is-active')) initialIndex = i;
});
- setActive(initialIndex, false, false);
+ setActive(initialIndex, false, true);
})();