Skip to content

[usePress] Hook doesn't call the onPress function when pressing the element at the corner #5290

Closed
@jrgarciadev

Description

@jrgarciadev

Provide a general summary of the issue here

When tapping the corners of certain elements, the onPress function does not get triggered. This issue is observed on select mobile devices and can be replicated using Chrome Dev Tools by selecting Responsive > Mobile Touch. Multiple NextUI components that rely on the usePress hook are impacted by this behavior.

Video (Check last part)

CleanShot.2023-10-22.at.21.49.59.mp4

🤔 Expected Behavior?

Call onPress function when pressing the element at its corners.

😯 Current Behavior

The onPress is not called when pressing any element/component that use the usePress under the hook.

💁 Possible Solution

I'm preparing a PR for this, we already fixed it in a local copy, but for us is better is this change is in the react-spectrum package.

🔦 Context

No response

🖥️ Steps to Reproduce

Version

3.19.1

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

macOS

🧢 Your Company/Team

NextUI

🕷 Tracking Issue

heroui-inc/heroui#1680
heroui-inc/heroui#1634
heroui-inc/heroui#1632
heroui-inc/heroui#1538

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions