devopsinthecloud icon indicating copy to clipboard operation
devopsinthecloud copied to clipboard

textViewShouldBeginEditing not called

Open nferruzzi opened this issue 9 years ago • 7 comments

Hello,

when I use the mention/any plugin my textViewShouldBeginEditing external delegate method is not called. Would it be possible to have it processed anyway ? My textview has a "fake" placeholder that needs to be removed on that delegate, apparently doing that on didBeginEditing will set the mention in a wrong internal state preventing me from creating a mention at location 0 (I open another bug for this).

thanks

nferruzzi avatar Mar 14 '15 16:03 nferruzzi

Thanks for reporting these. I'll take a look as soon as I have free time.

austinzheng avatar Mar 17 '15 06:03 austinzheng

Any update for the issue?

ikousik avatar Jun 15 '16 10:06 ikousik

Any updates on this?

jsdu avatar Sep 26 '16 22:09 jsdu

if textView.selectable = false, the method will NOT be called.

acalism avatar Oct 17 '16 08:10 acalism

Any update for the issue?

edittler avatar Nov 21 '16 17:11 edittler

Here is my round about way of solving the placeholder issue.

#pragma mark - UITextViewDelegate

- (void)textViewDidEndEditing:(UITextView *)textView
{
    if (![textView hasText]) 
        lbl.hidden = NO;
}

- (void)textViewDidChange:(UITextView *)textView{
    if (self.commentTextView.text.length > 500)
    {
        self.commentTextView.text = [self.commentTextView.text substringToIndex:500];
    }
    if (self.commentTextView.text.length == 0) {
        self.navigationItem.rightBarButtonItem.enabled = NO;
        lbl.hidden = NO;
    }
    else {
        self.navigationItem.rightBarButtonItem.enabled = YES;
        lbl.hidden = YES;
    }
}

jsdu avatar Nov 21 '16 17:11 jsdu

So you're hoping to have textViewShouldBeginEditing called exactly at what point in time?

dgattey avatar Mar 01 '19 08:03 dgattey