Setting white-space
css on QSelect isn't applied to nested span (possible regression since 2.18.1)
#17973
Labels
area/components
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
I noticed a possible regression in one of my apps. I had some QSelects where the value labels would contain newline characters (
\n
). While I need a slot for the options in the dropdown menu, for the representation of the actually selected value I could just set the csswhite-space: pre-wrap
on the QSelect. This would cause the css propertywhite-space-collapse: preserve
to be set on all the nested elements.What did you expect to happen?
Before (<= 2.18.0), setting
white-space: pre-wrap
(or any other value for that matter) would work and cause the selected value in the QSelect, if it contained \n characters, to render these as newlines, aswhite-space-collapse: preserve
would be set on all elements including the relevantspan
.Since 2.18.1, this behavior stopped working: most of the nested elements still have
white-space-collapse: preserve
, except the related span, which aswhite-space-collapse: collapse
set.Reproduction URL
https://jsfiddle.net/kLdf7qv5/22/
How to reproduce?
Note that switching Quasar versions (not possible afaik on jsfiddle) would show it works on
quasar
<= 2.18.0Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Components (quasar)
Platforms/Browsers
Chrome
Quasar info output
Relevant log output
Additional context
I am however not sure if this was ever supported in the first place. It seems the passing of the properties down to the span is intentional, but I could be wrong. I just wanted to flag it: if it is unintentional, you might want to decide what to do with this. If it was intentional, good to know and I'll double-check my projects.
Given the version number it happened in (2.18.1) and the release notes, I would suspect the "regression" to have been caused by changes for #17875
The text was updated successfully, but these errors were encountered: