ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[TextArea] readonly should not change element size with showExceededText

Open wvudako opened this issue 5 months ago • 7 comments

Is your feature request related to a problem?

Setup: Textarea with showExceededText shows a span with remaining characters below Trigger: When settings readonly that span is hidden and resizes the element Issue: If readonly is not static but toggled the element resizes and moves everything below

https://ui5.github.io/webcomponents-react/v2/?path=/story/inputs-textarea--default&args=readonly:!false;showExceededText:!true;maxlength:111

Describe the solution you'd like

Element should not resize if readonly is toggled

Describe alternatives you've considered

Our solution is to set display to hidden instead of none on the span. This is in our opinion a good solution as you would only set show showExceededText if readonly can be toggled and therefore would not waste any space if readonly was always true Some other placeholder text would be suitable as well

Additional Context

No response

Organization

No response

Declaration

  • [x] I’m not disclosing any internal or sensitive information.

wvudako avatar Jun 10 '26 11:06 wvudako

Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.

Lukas742 avatar Jun 10 '26 12:06 Lukas742

Hello @UI5/ui5-team-ctr-ril,

Could you please take a look on this issue. I created an isolated sample in playground: https://ui5.github.io/webcomponents/play/#eNq9U01v2zAM_SuKdkmCyN4OA4bUKbZ23WnABjQ7DPBFkZhYrSx5Fp0PBPnvo2SnSNFtvQ1J4OiRfI9-pI7cOA37rMLa8vmRO1kDn1-CM668Q3BIcDESgjVWHjat75wWa281E-K6dMXo87fb5c_vdywWRSA-mZVusyg5uJITFj9FBVLTf0bfIuDBQjxM587jeK5hbRzoCTsSpk2IUnPmvIMrAk6xPvGn-Nq3CrRQ3vpWSP3QBXyWy4r8zP__5YoaUDJVyTYAkgM_ll_Eh2TCEIpGE741sGt8iyVng80E7ozGaqFhaxSIdJgx4wwaaUVQ0sLiXfZ2IEODpHkv68ZCkfcncjkfbC5WXh9YaoyIV1I9DqNL7zFnW9mOhQiyuXkK3cbI5Crx_2ngAtww9DTPzrwXCHuULUhmNKlgf6BXokoFFdVAS_jy0ACrIQS5gSzLKB4qvxOwVwCarI0s10V-SXg9CKw6RO96-hXGbUII2Of2sb802zdKo1etaZAhtUAUtdedhdhAq-JRGpc9BGKlGabEZGG0rvdyWOlXzeCn2Zns4jKdkcublE8vmSqjgU3z0pk6LgMreZZfhEPXRDi1SNv2sjZ18az-IzmT72ClPCGONENOC475koz9RMaeuV4tuEnuntNLR68QkA3zWDDtVVdTdvarg_ZwDxYU-nZc8jdpTLRGQwUOwv-sedqcWNdrZFLruy1lf6VuwEHMi1NX1qjHks_YunMKjXdjiFn9XT6LZfTT3tkDqY5egKRxmlzx0-k3pSrDgw

Thanks & Kind Regards, Georgi

GDamyanov avatar Jun 10 '26 13:06 GDamyanov

@wvudako Hello and thank you for reaching out.

To help us find the right approach, could you share screenshots or a short screen recording of how this behaves in your app? We can reproduce the resize itself, but seeing it in your real layout, with the content around the field, would help us understand the actual impact and decide on the right approach.

A bit of context would also help:

  • Does the user trigger the switch between editable and read-only, or does it happen automatically?
  • Is the layout shift the main problem, or have you noticed other issues?

Thank you in advance!

Kind regards, Kaloyan

kaloyantinchev avatar Jun 12 '26 12:06 kaloyantinchev

Image Image

We have a dialog in which the user can toggle a switch that makes a textarea disabled or required. In the screenshots you can see the added whitespace below the textarea, that is currently not there without adoption. Without that fix on activating the switch the whole dialog is resized vertically As stated in the original message, just hiding instead of removing the showExceededText area is good enough for us, but leaves an unnecessary whitespace, which could also be filled with some placeholder

Everything else works as expected

wvudako avatar Jun 15 '26 07:06 wvudako

@wvudako Thank you for the additional context. We are currently working on an evaluation for a similar issue. We will get back to you as soon as we have a potential solution.

Kind regards, Kaloyan

kaloyantinchev avatar Jun 17 '26 08:06 kaloyantinchev

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Jul 01 '26 12:07 github-actions[bot]

:tada: This issue has been resolved in version v2.24.0 :tada:

The release is available on v2.24.0

Your semantic-release bot :package::rocket: