We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c26862 commit 9cb4102Copy full SHA for 9cb4102
src/js/01-nav.js
@@ -92,8 +92,8 @@
92
var padding = parseFloat(window.getComputedStyle(this).marginTop)
93
var rect = this.getBoundingClientRect()
94
var menuPanelRect = menuPanel.getBoundingClientRect()
95
- var overflowY = (rect.bottom - menuPanelRect.top - menuPanelRect.height + padding).toFixed()
96
- if (overflowY > 0) menuPanel.scrollTop += Math.min((rect.top - menuPanelRect.top - padding).toFixed(), overflowY)
+ var overflowY = Math.round(rect.bottom - menuPanelRect.top - menuPanelRect.height + padding)
+ if (overflowY > 0) menuPanel.scrollTop += Math.min(Math.round(rect.top - menuPanelRect.top - padding), overflowY)
97
}
98
99
0 commit comments