Skip to content

ui5-textarea: refactor textarea to sanitize special characters only on form submit #9868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
nikoletavnv opened this issue Sep 14, 2024 · 0 comments · May be fixed by #11305
Open
1 task done

ui5-textarea: refactor textarea to sanitize special characters only on form submit #9868

nikoletavnv opened this issue Sep 14, 2024 · 0 comments · May be fixed by #11305
Assignees
Labels
2.0 bug This issue is a bug in the code TOPIC RL

Comments

@nikoletavnv
Copy link
Member

Bug Description

Currently the textarea uses a mirror div element that is invisible and should match the visible textarea completely. The text in the mirror div is sanitized and special characters are escaped during the before rendering phase. This leas to difference in the text length in the visible textarea and the mirror element. The difference causes problems during textarea growing.
We can try to sanitize the mirror div content only when submitting a form.

Affected Component

ui5-textarea

Expected Behaviour

The text in the visible textarea and the hidden mirror div should match exactly

Isolated Example

No response

Steps to Reproduce

  1. Open https://sap.github.io/ui5-webcomponents/nightly/packages/main/test/pages/TextArea.html
  2. Scroll to "Text Area: Growing"
  3. Write the following text: text "hello" &
  4. In Chrome dev tools remove Visibility:hidden of the "ui5-textarea-mirror" element
  5. See that the textarea text and the mirror element content do not match
    ...

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.0.1

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@nikoletavnv nikoletavnv added bug This issue is a bug in the code and removed feature request labels Sep 14, 2024
@nikoletavnv nikoletavnv self-assigned this Oct 16, 2024
@nikoletavnv nikoletavnv removed their assignment Mar 25, 2025
@nikoletavnv nikoletavnv moved this from In progress to New Issues in Maintenance - Topic RL Mar 25, 2025
@MapTo0 MapTo0 self-assigned this Apr 9, 2025
@MapTo0 MapTo0 moved this from New Issues to In progress in Maintenance - Topic RL Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 bug This issue is a bug in the code TOPIC RL
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants