Clearing input element in mobile safari using javascript does not clear ios auto-correction buffer
I have an <input type="text">
element. The user enters a string and enters an element that clears the element via $('input').val('')
. The problem, apparently, is that iOS still has the previous input line in its auto-correction buffer, so when you start typing a new word and hit the space, it sees the last word from the previous line and the first word from the new line as one 'word' and tries to auto-correct it. Example:
message1: hello there
message2: well hi neighbor
iOS sees: therewell
for messages2 and auto- wellthere well
another example:
message1: hello moto
message2: boat
autocorrects to boatmotorboat
where motorboat
is the auto- motoboat
version of motoboat
(a combination of moto
from the first message and boat
from the second.
I understand that this might just be a bug in mobile safari, and I should just turn off autocorrect at the input, but maybe there is a better solution?
No one has answered this question yet.
See similar questions:
or similar: