Skip to content

Commit

Permalink
fix: focused settings scrtion buttons on some zoom levels
Browse files Browse the repository at this point in the history
  • Loading branch information
IEduStu authored Jul 24, 2024
1 parent 0fccb85 commit 1e0a56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/Settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const Settings = () => {
setSelectedSectionId(sections[sections.length - 1].id);
} else {
for (let i = sections.length - 1; i >= 0; i--) {
if (sections[i].ref.current.offsetTop - panelScrollPaddingTop - sectionsContainerRef.current.offsetTop <= sectionsContainerRef.current.scrollTop) {
if (sections[i].ref.current.offsetTop - panelScrollPaddingTop - sectionsContainerRef.current.offsetTop <= Math.floor(sectionsContainerRef.current.scrollTop + 0.9999)) {
setSelectedSectionId(sections[i].id);
break;
}
Expand Down

0 comments on commit 1e0a56c

Please sign in to comment.