Skip to content

Commit 772458a

Browse files
committed
Revert "change timeout to 50ms"
This reverts commit 2237970.
1 parent eb2432f commit 772458a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/@react-aria/interactions/src/usePress.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ export function usePress(props: PressHookProps): PressResult {
511511
state.target.click();
512512
}
513513
}
514-
}, 50);
514+
}, 60);
515515
// Use a capturing listener to track if a click occurred.
516516
// If stopPropagation is called it may never reach our handler.
517517
addGlobalListener(e.currentTarget as Document, 'click', () => clicked = true, true);

packages/@react-aria/interactions/test/usePress.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ describe('usePress', function () {
261261
expect(shouldFocus).toBe(true);
262262

263263
// Mouse events are not fired in this case, and the browser does not focus the element.
264-
act(() => jest.advanceTimersByTime(60));
264+
act(() => jest.advanceTimersByTime(70));
265265
expect(document.activeElement).toBe(el);
266266

267267
expect(events).toEqual([
@@ -352,7 +352,7 @@ describe('usePress', function () {
352352
expect(shouldClick).toBe(true);
353353
fireEvent(el, pointerEvent('pointerout', {pointerId: 1, pointerType: 'mouse', clientX: 0, clientY: 0}));
354354

355-
act(() => jest.advanceTimersByTime(60));
355+
act(() => jest.advanceTimersByTime(70));
356356

357357
expect(events).toEqual([
358358
{

0 commit comments

Comments
 (0)