Skip to content

Hoverer active after pointerleave #712

@ShaMan123

Description

@ShaMan123

Describe the bug 📝

Hoverer remains active after pointerleave if hovering an element and directly leaving the canvas without hovering anything else.
This is not desired IMO.

Workaround/Fix



    element.addEventListener(
      "pointerenter",
      () => {
        hoverer.enabled = true;
      },
      { signal }
    );

    element.addEventListener(
      "pointerleave",
      () => {
        hoverer.clear();
        hoverer.enabled = false;
      },
      { signal }
    );

Reproduction ▶️

No response

Steps to reproduce 🔢

  1. Activate Hoverer
  2. Hover over something on the edge of the canvas
  3. Move pointer away from canvas

System Info 💻

n/a

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Community.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions