themes icon indicating copy to clipboard operation
themes copied to clipboard

Select inside a disabled fieldset remains active

Open stevesims opened this issue 6 months ago • 1 comments

In an HTML form, a select element placed inside a fieldset with a disabled attribute will inherit that attribute and be disabled.

A radix-themes Select component placed inside a disabled fieldset will be visually styled as if it were disabled, however it remains active. It can still be clicked on, and will still allow a selection to be made.

The only way to disable the functionality of a Select component is to explicitly set a disabled attribute on Select.Root.

The Select component should really be prevented from working when placed inside a disabled fieldset.

stevesims avatar Jul 07 '25 11:07 stevesims

I must admit that I found it rather puzzling that Select will work inside a disabled fieldset (and can be clicked on to reveal its contents and make a selection) given that as per my observations on #745 a Button won't respond to clicks when placed inside a disabled fieldset.

there must be some magic going on with the Select.Trigger to allow its button to work that I don't yet understand

stevesims avatar Jul 07 '25 11:07 stevesims