Skip to content

Commit 162d7f1

Browse files
screen-gdclaude
andcommitted
fix(web): dropdown items over the desktop title bar respond to clicks
Select, combobox, and autocomplete popups lacked the no-drag opt-out that menus (#12527) and popovers (#31794) already have. Electron's drag hit-testing ignores z-index, so any item drawn over a title-bar drag region swallowed its click. The voice "Transcribe with" list grew with cloud options and now reaches the top of the window, leaving "Off" unclickable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 25bf84a commit 162d7f1

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎apps/web/src/components/ui/autocomplete.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ function AutocompletePopup({
107107
)}
108108
>
109109
<AutocompletePrimitive.Popup
110-
className="flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground"
110+
// Electron drag hit-testing ignores z-index; items over a drag region would swallow clicks.
111+
className="flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground [-webkit-app-region:no-drag]"
111112
data-slot="autocomplete-popup"
112113
{...props}
113114
>

‎apps/web/src/components/ui/combobox.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ function ComboboxPopup({
172172
)}
173173
>
174174
<ComboboxPrimitive.Popup
175-
className="flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground"
175+
// Electron drag hit-testing ignores z-index; items over a drag region would swallow clicks.
176+
className="flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground [-webkit-app-region:no-drag]"
176177
data-slot="combobox-popup"
177178
{...props}
178179
>

‎apps/web/src/components/ui/select.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ function SelectPopup({
128128
sideOffset={sideOffset}
129129
>
130130
<SelectPrimitive.Popup
131-
className="origin-(--transform-origin) rounded-lg text-foreground outline-none"
131+
// Electron drag hit-testing ignores z-index; items over a drag region would swallow clicks.
132+
className="origin-(--transform-origin) rounded-lg text-foreground outline-none [-webkit-app-region:no-drag]"
132133
data-slot="select-popup"
133134
{...props}
134135
>

0 commit comments

Comments
 (0)