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 aa62843
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .changeset/gestures-every-pointer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,6 @@
2
2
'@astryxdesign/core': patch
3
3
---
4
4
5
-
[chore] Internal: gestures attach for every pointer, a mouse, a pen and a finger alike (AST-094 FR43). Under a fine primary pointer an element that uses a gesture keeps one passive `pointerdown` listener (a recognizer that claims a moving finger also keeps its blocking `touchmove`), and the page's listeners last only a press. A right click or a ctrl-click on macOS starts no press. A mouse or pen drag that a recognizer claims takes no text selection from then on, and a finger is read once where the browser sends Touch Events without exposing `ontouchstart`. A press tracker takes a mouse press as a press, painting at once with no scroll brake. The screen-edge pan stays off under a mouse, a trackpad and a pen unless its caller allows one, and `perEventPointer` is accepted and does nothing. Not exported from the package entry point.
5
+
[chore] Internal: gestures attach for every pointer, a mouse, a pen and a finger alike (AST-094 FR43). Under a fine primary pointer an element that uses a gesture keeps one passive `pointerdown` listener (a recognizer that claims a moving finger also keeps its blocking `touchmove`), and the page's listeners last only a press. A right click or a ctrl-click on macOS starts no press. A mouse or pen drag that a recognizer claims takes no text selection from then on, anywhere on the page, and a finger is read once where the browser sends Touch Events without exposing `ontouchstart`. A press tracker takes a mouse press as a press, painting at once with no scroll brake. The screen-edge pan stays off under a mouse, a trackpad and a pen unless its caller allows one, and `perEventPointer` is accepted and does nothing. Not exported from the package entry point.
Copy file name to clipboardExpand all lines: packages/core/src/gestures/__tests__/GestureHost.test.ts
+101Lines changed: 101 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3709,6 +3709,50 @@ describe('gestures attach for every pointer (spec:AST-094 FR43, FR19, FR24)', ()
3709
3709
}
3710
3710
});
3711
3711
3712
+
it('holds selection off document-wide while a mouse pan claims, as WebKit extends a drag selection past the pan: a selection begun elsewhere goes, until the press is over',async()=>{
3713
+
const{box, outside}=mount(
3714
+
'<p id="outside">Text outside the pan</p><div id="box">Pan</div>',
'<h1 id="heading">A story heading with words</h1><p>A description with several words in it.</p><button>One</button><button>Two</button><div id="card" style="margin-top: 24px; width: 320px; height: 120px; background: #ccd">Card text a drag would select</div><p>Text below the card, with words.</p>';
// Past the pan's start, then up over the text above the card.
1242
+
awaitpage.mouse.move(x+30,y-10,{steps: 4});
1243
+
awaitpage.mouse.move(x+60,card.y-80,{steps: 12});
1244
+
constduring=awaitpage.evaluate(()=>
1245
+
String(window.getSelection()??'').trim(),
1246
+
);
1247
+
awaitpage.mouse.up();
1248
+
constafter=awaitpage.evaluate(()=>
1249
+
String(window.getSelection()??'').trim(),
1250
+
);
1251
+
expect([during,after]).toEqual(['','']);
1252
+
});
1253
+
1215
1254
test("the host registers no page touch listener while idle and warns for nothing, though the page attaches recognizers: an element keeps only a claiming recognizer's blocking touchmove; a mouse drag pans (spec:AST-094 FR43, FR24, FR19)",async({
0 commit comments