We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fde8fad commit 5b1a920Copy full SHA for 5b1a920
tests/new-range.spec.tsx
@@ -1010,6 +1010,19 @@ describe('NewPicker.Range', () => {
1010
expect(startInput.selectionEnd).toEqual(6);
1011
});
1012
1013
+ it('focus by mousedown defers selection sync to mouseUp', () => {
1014
+ const { container } = render(<Demo />);
1015
+
1016
+ const startInput = container.querySelectorAll<HTMLInputElement>('input')[0];
1017
1018
+ fireEvent.mouseDown(startInput);
1019
+ fireEvent.focus(startInput);
1020
1021
+ fireEvent.mouseUp(startInput);
1022
+ expect(startInput.selectionStart).toBeDefined();
1023
+ expect(startInput.selectionEnd).toBeDefined();
1024
+ });
1025
1026
it('blur to reset back text', async () => {
1027
const { container } = render(<Demo />);
1028
0 commit comments