usePreserveInputCaretPosition tracks the input caret position and place it at the correct position so user can have a natural typing experience.