Fix an issue where text change events could potentially be incorrectly called.