Closed ogoffart closed 8 months ago
The fact that calling set-selection-offsets unconditionally issues an IME update feels wrong to me. The system input method should only get informed if the text input is focused.
I know this is orthogonal, there are still other ways to trigger that recursion - I don’t mean to downplay the more general issue.
I wonder if it’s perhaps wrong to lazily instantiate the component in the container and if instead we should do it immediately.
The fact that calling set-selection-offsets unconditionally issues an IME update feels wrong to me.
That is a very good point. We ought to check has-focus before doing so.
I wonder if it’s perhaps wrong to lazily instantiate the component in the container and if instead we should do it immediately.
I was thinking maybe doing it in a change handler or something, after one iteration
The test case works now with #4420 So i'm closing this issue, even if i'm sure there are still way to get to recursion and we probably should re-thinnk when to ComponentContainer instentiate its contents.
I was previewing something like this:
Commit for fix #3950 did a fix that is specific to focus() call because they are common. But other calls from the init callback could have bad effect