fix(refresher): scroll styles are reset when using non-native refresher - #27602
Conversation
|
|
liamdebeasi
left a comment
There was a problem hiding this comment.
I made some changes to your PR. The original fix worked, but the restoreOverflowStyle was happening before the setTimeout callback fired in close(). This prevented some inline transition styles from being cleared properly. It did not cause any functional issues that I was aware of, but we should still make sure we are cleaning up styles when we no longer need them.
The revised fix causes the styles to be cleared once the setTimeout callback fires. I also added a case for when the pull gesture is reset.
|
I'm observing this behavior testing on device, specifically if you cancel the gesture, the first attempt to scroll prevents the scroll and activates the item. However, attempting to scroll after does work as expected. Is this expected? RPReplay_Final1686167147.MP4 |
sean-perkins
left a comment
There was a problem hiding this comment.
We chatted in Slack, the behavior I observed is from:
ionic-framework/core/src/components/refresher/refresher.tsx
Lines 715 to 720 in 9d459bd
Great work both of you!
…er (#27602) Issue number: resolves #27601 --------- ## What is the current behavior? The current behavior restores overflow styles while moving (within the setCSS function). ## What is the new behavior? Overflow styles are restored when refresher gesture ends. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> Honestly, I don't know exactly. From code perspective I would say 'Yes', but I can't get the impact of the change. Ionic Team edit: There are no changes to the public API, and this is fixing a behavior that used to work so there are no breaking changes. ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> --------- Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Issue number: resolves #27601
What is the current behavior?
The current behavior restores overflow styles while moving (within the setCSS function).
What is the new behavior?
Overflow styles are restored when refresher gesture ends.
Does this introduce a breaking change?
Honestly, I don't know exactly. From code perspective I would say 'Yes', but I can't get the impact of the change.
Ionic Team edit: There are no changes to the public API, and this is fixing a behavior that used to work so there are no breaking changes.
Other information