You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a story which contains a custom element, I want to be able to type certain characters into the element such as "1".
Probable cause of the issue
Storybook has a check when you type inside an input element to verify if the keyboard event is emitted from an input, textarea or contenteditable element. This check, however, does not work from within custom elements because of event retargeting.
Extend the check to the first element in the target.composedPath()
Extend the check to elements that have an aria role like input, searchbox, textbox or combobox
If somebody wants to create a PR with one of the suggested solutions, that would be a great contribution
Describe the bug
When I have a story which contains a custom element, I want to be able to type certain characters into the element such as "1".
Probable cause of the issue
Storybook has a check when you type inside an input element to verify if the keyboard event is emitted from an input, textarea or contenteditable element. This check, however, does not work from within custom elements because of event retargeting.
To Reproduce
https://stackblitz.com/edit/github-gdt3q9?file=src%2Fstories%2FInput.stories.ts
type 1 inside the given input
System
Additional context
Suggested solution
The text was updated successfully, but these errors were encountered: