diff --git a/js/src/orange-navbar.js b/js/src/orange-navbar.js index bca031f98d..d38c1688c4 100644 --- a/js/src/orange-navbar.js +++ b/js/src/orange-navbar.js @@ -63,9 +63,17 @@ class OrangeNavbar extends BaseComponent { * Data API implementation */ +let timer = null + EventHandler.on(window, EVENT_SCROLL_DATA_API, () => { for (const el of SelectorEngine.find(SELECTOR_STICKY_TOP)) { - OrangeNavbar.enableMinimizing(el) + if (timer !== null) { + clearTimeout(timer) + } + + timer = setTimeout(() => { + OrangeNavbar.enableMinimizing(el) + }, 50) } })