The way we write this code here (by making the consumers of InputField ignore the fact that there are promises) makes it also impossible to do f.e.:

* First call replaceSurroundingText
* If that succeeds, then send a key event

F.e. this is the flow that we need to do when autocorrecting. In previous keyboard we had a bug where the text in a textarea would be `Some\n` when you pressed enter while an autocorrection was in place, because we called replaceSurroundingText with the new string `Some\n`. Even though the enter could be canceled. Which means there is a bug where ENTER cannot be used to submit forms if the current word can be autocorrected.