DPTagTextView icon indicating copy to clipboard operation
DPTagTextView copied to clipboard

Tag Color Deselecting On Removing Text

Open manpreet444 opened this issue 3 years ago • 3 comments

https://user-images.githubusercontent.com/22388765/160295794-a64cb790-8b2a-4124-9137-461210e8a120.mov

manpreet444 avatar Mar 27 '22 18:03 manpreet444

@manpreet444 Did you solve it? I have the same issue

BH102 avatar Sep 26 '22 20:09 BH102

I have solved it

The problem was when you delete a word between 2 spaces it will delete one space with the word without count it in the shouldChangeTextIn function then the replacementText count will not be correct, it will cause shifting all tags ranges.

The solution is really simple just set this property in UITextView to no

smartInsertDeleteType = .no

BH102 avatar Sep 26 '22 22:09 BH102

Hi @BH102,

I appreciate you solved this problem. Can you contribute to this repo by creating PR with this issue fix?

Thanks, Datt

Datt1994 avatar Sep 29 '22 11:09 Datt1994