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
This is likely happening for all text inputs. Each time a character is entered, the Component in the iframe is invoking its useState setter. This causes a re-render of the outer DOM, which I'm guessing causes the input to lose and reacquire focus.
If the outer application tracked interactions like this, it could potentially intercept the focus disruption and place the cursor in the correct position. I imagine you could do this with focus/blur listeners on text inputs in the outer DOM that can detect or query whether the event happened as a result of a Component re-render.
Using the ComponentSource input and trying to edit the middle of the text leads to the unexpected cursor behaviour.
InputBug.mov
The text was updated successfully, but these errors were encountered: