Skip to content

Commit

Permalink
fix: Tabs flicker in zoom mode (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Sep 29, 2024
1 parent 40ac121 commit a42592b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useVisibleRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function useVisibleRange(
let endIndex = len;
for (let i = 0; i < len; i += 1) {
const offset = tabOffsets.get(tabs[i].key) || DEFAULT_SIZE;
if (offset[position] + offset[charUnit] > transformSize + visibleTabContentValue) {
if (Math.floor(offset[position] + offset[charUnit]) > Math.floor(transformSize + visibleTabContentValue)) {
endIndex = i - 1;
break;
}
Expand Down

0 comments on commit a42592b

Please sign in to comment.