iOS: Safari: TextEdit only receives a letter not the text completion
Steps to reproduce the behavior:
- in Safari on iOS go to the web demo
- go to a TextEdit
- enter a character, e.g. "c"
- select a proposed text completion e.g. "can"
Now, only the letter "c" is entered, not the selected text completion.
This only happens for the first word though. If the next suggested word is e.g. "you" and you select "you", indeed "you" is entered. The TextEdit now contains "c you" instead of "can you".
Do you know if there is a JS event generated when you click a completion? If not, this is very difficult to do.
Mobile text input is sort of a hack in eframe right now. Text selection is not working either.
The input.addEventListener("input", updateValue); from the example
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event#javascript works for both the initial character and the text completion on iOS for me.
According to eframe's install_text_agent() this is what is used.
The difference is that the MDN example uses event.target.value while eframe uses the input fields value. But that should be the same? Maybe instead this is related to update_text_agent()?
On a different note: on macOS Safari the MDN example shows text completion, while the egui examples do not.