You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 545b190
Browse filesBrowse the repository at this point in the historyBrowse files
test(gestures): a scroll-edge pan cancels its first moves while every scroller under it is at the edge
spec:AST-094 FR19 and DEC-18 (proposed in meta#8628): a scrollEdge pan may
cancel its touch's moves from the first one, only while every scroller
under the finger sits at its edge and the finger moves away from it, and
only the moves the browser would rubber-band; it still begins at FR17's
10 px. The first case reads the first 2 px move cancelled at the edge and
fails on this head; the others keep what must not change: room to scroll
leaves every move to the browser, a first move toward the content too, a
pan without scrollEdge cancels nothing before it begins, and a touch the
browser took for a scroll stays the browser's when the list reaches its
edge.
it('cancels the moves from the first one while every scroller under the finger is at its edge and the finger pulls away from it; the pan still begins at 10 px',()=>{
792
+
const{pan, at, lift}=sheetOverList(0);
793
+
expect(at(102,16).defaultPrevented).toBe(true);
794
+
expect(pan.state).toBe('possible');
795
+
expect(at(107,32).defaultPrevented).toBe(true);
796
+
expect(pan.state).toBe('possible');
797
+
expect(at(112,48).defaultPrevented).toBe(true);
798
+
expect(pan.state).toBe('began');
799
+
lift(112,64);
800
+
});
801
+
802
+
it('leaves the moves to the browser while a scroller under the finger can still scroll that way',()=>{
803
+
const{pan, at, lift}=sheetOverList(50);
804
+
expect(at(102,16).defaultPrevented).toBe(false);
805
+
expect(at(107,32).defaultPrevented).toBe(false);
806
+
expect(at(112,48).defaultPrevented).toBe(false);
807
+
expect(pan.state).toBe('failed');
808
+
lift(112,64);
809
+
});
810
+
811
+
it('leaves a first move toward the content to the browser',()=>{
812
+
const{at, lift}=sheetOverList(0);
813
+
expect(at(98,16).defaultPrevented).toBe(false);
814
+
lift(98,32);
815
+
});
816
+
817
+
it('cancels nothing before a pan without scrollEdge begins',()=>{
0 commit comments