useSelectionRange tracks the input selection range.
github.com/trinhthinh388/react-awesome-components