nuxt / nuxt/ui

USelect fails to close on click when it (or one of its parents) has pointer-events classes applied

Open
#6,752 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Environment

Operating system: Windows 10.0.26200
Node.js version: v26.5.0
Nuxt version: 4.4.8
Nuxt/ui version: ^4.10.0

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.10.0

Reproduction

https://play.ui.nuxt.com/#eNq9UU1LxDAQ/StDLlWw9uBt7QqKF2+CigfrIabTGkwzIZkUYdn/blq7kVVQ8LC5zEfey3uPbMSlc6djRLESdVBeO4aAHB0Yaft1Izg04qKxenDkGTbgsYMtdJ4GKBKtOG+sIhsYNOMQYD0Bjp6KK6neDPXFCRT31NJUbyzceuo9hjCN12SxeD7O/FGaiAs/06fruvr0lVykIak4IxnTBFC3egRlZAjJ6VCeQWfwHXrplrZUZGb7kM4EXlqAR82vFBleYr/a7fYADdcPd2hQJWflQC2aJDF7bASs5rBpMde0qDKvrr5e2eu/q/+QzkEcacvoSxzRcihlZMohZvCBjf1T+tc4fxrbdXWVf1xsPwD+edY2

Description

I noticed that if USelect or one of its parent elements has the pointer-events-auto class applied, USelect sometimes fails to close when clicked.

To reproduce, click each USelect component ~ 10 times in the provided URL. The first USelect closes correctly every time. The other two USelect components close inconsistently — sometimes they close, and sometimes they appear to reopen immediately after closing, which is not the expected behavior.

Additional context

I have a map application with a div overlay that has pointer-events-none applied. Inside this overlay, I have a USelect component with pointer-events-auto. This is a common use case, but USelect behaves unreliably in this scenario.

Logs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction and inspect USelect's open/close behavior when the component or a parent has pointer-events-auto or pointer-events-none. Reproduce repeated clicks on all three selects and trace the interaction that causes a close to be followed by an immediate reopen. Done means each select closes reliably in the pointer-events scenario described.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, tailwindcss, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.