Skip to content

useMousePressed - account for target initially being null in non client-only components #3818

@DamianGlowala

Description

@DamianGlowala

Clear and concise description of the problem

Currently, I can't find a way to declare useMousePressed in the top level <script setup> of a component, which doesn't have the target element available straightaway (initially is null before the component mounts). Could this be handled internally, please?

Suggested solution

Watch target internally and apply listeners based on its presence.

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    direction: approvedThe direction of feature/change is approved by the team. May require some small changes.enhancementNew feature or requestvue: upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions