Scale Version
@telekom/scale-components@3.0.0-beta.160. The relevant code on main looks
unchanged, so I do not think 3.0.0-beta.161 fixes it either.
Framework and version
Vue 3.5.33, using the web components directly via defineCustomElements from
@telekom/scale-components/loader — no auto-generated wrapper package. The
behaviour is in the component itself, so the framework should not matter.
Current Behavior
scale-dropdown-select accepts a readonly prop — it is in the shipped type
declarations — but setting it does nothing. The dropdown still opens on click
and via the keyboard, and the value can still be changed. There is also no
visual difference between a read-only and an editable field.
disabled works correctly; only readonly is affected.
From reading the source, readonly looks unimplemented rather than broken:
setOpen() early-returns on this.disabled only, so readonly never
prevents the listbox from opening.
- The combobox trigger sets
tabindex: this.disabled ? '-1' : '0', so a
read-only field stays in the tab order.
getBasePartMap() emits a readonly part token, but dropdown-select.css
has no rule matching it, so there is no read-only styling.
handleClearClick() is the only handler that checks readonly, and it is
only reachable when allow-clear is set.
Expected Behavior
A read-only dropdown should not open and its value should not be changeable,
consistent with readonly on scale-text-field. Ideally it would also be
visually distinguishable from an editable field.
Code Reproduction
https://codesandbox.io/p/devbox/scale-components-plain-html-template-forked-wsz56r
No framework needed — this is enough:
<scale-dropdown-select readonly label="City" value="berlin">
<scale-dropdown-select-item value="berlin">Berlin</scale-dropdown-select-item>
<scale-dropdown-select-item value="bonn">Bonn</scale-dropdown-select-item>
</scale-dropdown-select>
- Click the field — the listbox opens.
- Pick "Bonn" — the value changes, despite
readonly.
- Press Tab — the field is still in the tab order, and
Enter/ArrowDown opens it too.
Swapping readonly for disabled behaves as expected, which is the contrast
that makes this look like an oversight.
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
- Version: -
Scale Version
@telekom/scale-components@3.0.0-beta.160. The relevant code onmainlooksunchanged, so I do not think
3.0.0-beta.161fixes it either.Framework and version
Vue 3.5.33, using the web components directly via
defineCustomElementsfrom@telekom/scale-components/loader— no auto-generated wrapper package. Thebehaviour is in the component itself, so the framework should not matter.
Current Behavior
scale-dropdown-selectaccepts areadonlyprop — it is in the shipped typedeclarations — but setting it does nothing. The dropdown still opens on click
and via the keyboard, and the value can still be changed. There is also no
visual difference between a read-only and an editable field.
disabledworks correctly; onlyreadonlyis affected.From reading the source,
readonlylooks unimplemented rather than broken:setOpen()early-returns onthis.disabledonly, soreadonlyneverprevents the listbox from opening.
tabindex: this.disabled ? '-1' : '0', so aread-only field stays in the tab order.
getBasePartMap()emits areadonlypart token, butdropdown-select.csshas no rule matching it, so there is no read-only styling.
handleClearClick()is the only handler that checksreadonly, and it isonly reachable when
allow-clearis set.Expected Behavior
A read-only dropdown should not open and its value should not be changeable,
consistent with
readonlyonscale-text-field. Ideally it would also bevisually distinguishable from an editable field.
Code Reproduction
https://codesandbox.io/p/devbox/scale-components-plain-html-template-forked-wsz56r
No framework needed — this is enough:
readonly.Enter/ArrowDown opens it too.
Swapping
readonlyfordisabledbehaves as expected, which is the contrastthat makes this look like an oversight.
Desktop (please complete the following information):