Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Input component escaping Ampersand in Storybook #581

Open
mahalde opened this issue Mar 17, 2021 · 0 comments
Open

Input component escaping Ampersand in Storybook #581

mahalde opened this issue Mar 17, 2021 · 0 comments

Comments

@mahalde
Copy link

mahalde commented Mar 17, 2021

Currently the form control input component escapes to HTML entities (> to >) only in display. The problem is that the ampersand part of the escaped HTML entity also gets translated to an HTML entity on the next keystroke. This leads to more and more text in the input field. The only way of clearing the input field is then to press CTRL + Backspace to clear everything in the input.

Steps to reproduce:

  1. Visit the form control input component page.
  2. Type an ampersand or > or < in the input field.
  3. Press the backspace key.

Expected: The character should be removed.

Actual: The displayed string grows larger on every keystroke.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant