Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@react-aria/interactions/src/useHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function setGlobalIgnoreEmulatedMouseEvents() {
// the distant future because a user previously touched the element.
setTimeout(() => {
globalIgnoreEmulatedMouseEvents = false;
}, 50);
}, 500);
Copy link
Member Author

@snowystinger snowystinger Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I hate this fix, this is much too long, but 200 wasn't working, which felt like the edge of the reasonable range...

}

function handleGlobalPointerEvent(e: PointerEvent) {
Expand Down
6 changes: 3 additions & 3 deletions packages/@react-aria/interactions/test/useHover.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('useHover', function () {
fireEvent(el, pointerEvent('pointerout', {pointerType: 'touch'}));
fireEvent(el, pointerEvent('pointerup', {pointerType: 'touch'}));

act(() => {jest.advanceTimersByTime(100);});
act(() => {jest.advanceTimersByTime(600);});

// Safari on iOS has a bug that fires a pointer event with pointerType="mouse" on focus.
// See https://bugs.webkit.org/show_bug.cgi?id=214609.
Expand Down Expand Up @@ -321,7 +321,7 @@ describe('useHover', function () {
let el = res.getByTestId('test');
fireEvent(el, pointerEvent('pointerover', {pointerType: 'mouse'}));
expect(el).toHaveAttribute('data-hovered', 'true');

let button = res.getByRole('button');
act(() => button.click());
expect(button).not.toBeInTheDocument();
Expand Down Expand Up @@ -444,7 +444,7 @@ describe('useHover', function () {
fireEvent.mouseLeave(el);
fireEvent.touchEnd(el);

act(() => {jest.advanceTimersByTime(100);});
act(() => {jest.advanceTimersByTime(600);});

// Safari on iOS has a bug that fires a mouse event on focus.
// See https://bugs.webkit.org/show_bug.cgi?id=214609.
Expand Down
Loading