canonical / react-components

A set of components based on Vanilla Framework
https://canonical.github.io/react-components
99 stars 55 forks source link

`Modal`/`ConfirmationModal`: Maintain focus #1059

Open Dampolo03 opened 6 months ago

Dampolo03 commented 6 months ago

I have a ConfirmationModal or Modal with children - Input and TextArea components. When I focus into the text area and begin to type, there's some sort of re-render, the focus keeps getting lost from the text area and returns to the input component. screencast-gif

bartaz commented 6 months ago

There is some logic in the modal to keep focus within it (so when focus moves out it returns to first focusable element). It seems like this issue may be related to that functionality.