Fix editor text being reverted when closing keyboard.