Repository navigation
Conversation
|
@Pareder is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. Walkthrough全局 Changestouchmove 取消条件
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #539 +/- ##
=======================================
Coverage 99.26% 99.26%
=======================================
Files 17 17
Lines 543 544 +1
Branches 167 168 +1
=======================================
+ Hits 539 540 +1
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…m rc-component (#135) * fix(virtual-list): skip preventDefault on non-cancelable scrollbar touchstart (react-component/virtual-list#396) * fix(tour): preserve zero-valued close icon overrides (react-component/tour#112) * fix(menu): preserve zero-valued item and expand icons (react-component/menu#897) * fix(input): preserve zero-valued suffix content (react-component/input#205) * fix(slider): skip preventDefault on non-cancelable touch events in useDrag (react-component/slider#1101) * fix(image): only preventDefault on cancelable touchmove events (react-component/image#539) * chore(sync): advance color-picker, image, input, menu, mutate-observer, rate, slider, tour and virtual-list cursors to upstream HEAD --------- Co-authored-by: yanyubot <356405855+yanyubot@users.noreply.github.com>
Closes #538
What
The window
touchmovelistener inuseTouchEventnow callspreventDefault()only whene.cancelableistrue.Why
The preview opens while a touch-scroll gesture is sometimes still in progress. The remaining
touchmoveevents in that gesture are not cancelable, so Chrome ignorespreventDefault()and logs one intervention per event:Behaviour is unchanged: a non-cancelable event can't be prevented, and cancelable events are still blocked from scrolling the page.
Tests
tests/previewTouch.test.tsxSummary by CodeRabbit