bonafideduck/react-highlight-within-textarea

Range highlight does not work if boundary is end of the string

Closed this issue · 2 comments

I came around to update to V 2.x and noticed that highlighting a range does no longer work properly if the last index to highlight is at the absolute end of the string. This can be seen in the Array of Two Numbers (Range) example. You see that 'banana' is highlighted. If you delete everything after 'banana' including the space, 'banana' is no longer highlighted.

Thanks for the issue. I agree this is a bug. I’ll check it out.

Awesome, thanks for the quick fix!