Skip to content

[Bug] NavigationMenu: disableClickTrigger not working in Firefox #2168

@red-gecko27

Description

@red-gecko27

Environment

Developement/Production OS: Linux KDE
Browser: Firefox 128.13.0esr (64 bits)

Link to minimal reproduction

https://stackblitz.com/edit/dv8f61cq-fnj9qhkr?file=src%2FApp.vue

Steps to reproduce

Use NavigationMenuRoot with :disable-click-trigger="true"

Describe the bug

In Firefox, @click in Vue sends a MouseEvent instead of a PointerEvent.
As a result, event.pointerType is undefined in Firefox.
On Chromium, this issue does not occur.

// src/NavigationMenu/NavigationMenuTrigger.vue#L91
function handleClick(event: PointerEvent) {
  if (event.pointerType === 'mouse' && menuContext.disableClickTrigger.value) {
    ...
  }
}

see file:

if (event.pointerType === 'mouse' && menuContext.disableClickTrigger.value)

Expected behavior

No response

Context & Screenshots (if applicable)

No response

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