Skip to content

Commit

Permalink
fix: handle ios overscroll
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroBern committed Feb 5, 2021
1 parent 4c9cfce commit 72b4e54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/createCollapsibleTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,11 @@ const createCollapsibleTabs = <T extends TabName>() => {
},
(delta) => {
if (delta) {
if (accScrollY.value <= 0) {
if (scrollYCurrent.value <= 0) {
// handle overscroll on ios, when being dragged beyond the top border
accDiffClamp.value = 0
} else {
const nextValue = accDiffClamp.value + delta

if (delta > 0) {
// scrolling down
accDiffClamp.value = Math.min(
Expand Down

0 comments on commit 72b4e54

Please sign in to comment.