Skip to content

Select dropdown menu allows mouse events to pass through to background elements #1909

@windedge

Description

@windedge

Description

When using a Select component inside a Dialog, mouse drag events in the dropdown menu pass through to background elements, causing unintended text selection in the content behind the dialog.

Environment

  • GPUI: v0.2.2
  • GPUI Component: v0.5.0
  • Platform: Windows 11

Steps to Reproduce

  1. Open a Dialog containing a Select component
  2. Click the Select to open the dropdown menu
  3. Click and drag within the dropdown menu to scroll or select items
  4. Observe that text in the background (behind the dialog) gets selected

Screenshots

Image

Expected

Mouse events within the Select dropdown menu should be fully contained and not affect any elements behind the dialog overlay.

Actual

Mouse drag events pass through to background elements, causing text selection in content areas that should be blocked by the dialog's overlay.

Analysis

The Select dropdown menu (rendered via deferred + anchored in select.rs:870-909) uses .occlude() on the popup container, but mouse drag events still propagate to background elements. This may be related to the rendering order or event handling priority of deferred elements.

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