Skip to content

Commit 59f4543

Browse files
authored
fix: prevent focus ring from appearing when selecting RAC Listbox on iPad (#7720)
* increase timer * build verdaccio * more verdaccio build stuff * lower timeout to 60ms * change timeout to 50ms * Revert "build verdaccio" This reverts commit af1ca49. * Revert "more verdaccio build stuff" This reverts commit d332979. * Revert "change timeout to 50ms" This reverts commit 2237970. * increase timeout to 500ms * turn on verdaccio comments * 200ms timeout? * 70ms timeout * Revert "turn on verdaccio comments" This reverts commit bf0a5f6. * timeout to 80ms
1 parent 9bd8a5f commit 59f4543

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ export function usePress(props: PressHookProps): PressResult {
526526
state.target.click();
527527
}
528528
}
529-
}, 40);
529+
}, 80);
530530
// Use a capturing listener to track if a click occurred.
531531
// If stopPropagation is called it may never reach our handler.
532532
addGlobalListener(e.currentTarget as Document, 'click', () => clicked = true, true);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ describe('usePress', function () {
262262
expect(shouldFocus).toBe(true);
263263

264264
// Mouse events are not fired in this case, and the browser does not focus the element.
265-
act(() => jest.advanceTimersByTime(50));
265+
act(() => jest.advanceTimersByTime(90));
266266
expect(document.activeElement).toBe(el);
267267

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

356-
act(() => jest.advanceTimersByTime(50));
356+
act(() => jest.advanceTimersByTime(90));
357357

358358
expect(events).toEqual([
359359
{

0 commit comments

Comments
 (0)