Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken in iOS7: multiplies tokens while switching to textView #61

Closed
zxcat opened this issue Sep 24, 2013 · 6 comments
Closed

broken in iOS7: multiplies tokens while switching to textView #61

zxcat opened this issue Sep 24, 2013 · 6 comments
Assignees
Labels

Comments

@zxcat
Copy link

zxcat commented Sep 24, 2013

Steps to reproduce:

  1. Run example project in iOS7
  2. type something, which is not found in demo names. For example "zz"
  3. Now textView is visible, tap on it
  4. tap on textField again
  5. repeat steps 3-4 several times
  6. See the Bug
@thermogl
Copy link
Owner

Yup, I'm seeing it. Dunno why yet.

@zxcat
Copy link
Author

zxcat commented Sep 25, 2013

UITextView and UITextField changed in iOS7. I've found (in my other project), they can send more messages to delegate comparing with iOS6 and earlier.
E.g. for UITextView I receiving -textViewDidChange: and -textViewDidChangeSelection in places where they were not sent earlier.
Maybe this is somehow related.

@thermogl
Copy link
Owner

I agree, for some reason the text isn't tokenized when the field loses focus, as it should.

@zxcat
Copy link
Author

zxcat commented Sep 27, 2013

More fun, related with issue:
(+) button shows modal view controller in my code.

  1. enter some text, to make search list appear under field
  2. tap (+) to show VC
    After return from modal VC, field will contain 8x tokens (or even more)

Instead of step 2 you can pop current VC (go back with navigation bar). In this case keyboard will be visible in that previous VC.

@zxcat
Copy link
Author

zxcat commented Oct 4, 2013

One problem is here:

0x0009f23a in -[TITokenField addToken:] at Pods/TITokenField/TITokenField.m:608
0x0009f0bd in -[TITokenField addTokenWithTitle:representedObject:] at Pods/TITokenField/TITokenField.m:592
0x0009ef55 in -[TITokenField addTokenWithTitle:] at Pods/TITokenField/TITokenField.m:585
0x0009feac in __28-[TITokenField tokenizeText]_block_invoke at Pods/TITokenField/TITokenField.m:685
0x032b405d in __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke ()
0x032b3f92 in -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] ()
0x032310a5 in -[NSArray enumerateObjectsUsingBlock:] ()
0x0009fd07 in -[TITokenField tokenizeText] at Pods/TITokenField/TITokenField.m:684
0x0009e52a in -[TITokenField didEndEditing] at Pods/TITokenField/TITokenField.m:531

After losing focus -[TITokenField didEndEditing] is called. But at some point -[TITokenField addToken:] being executed. It runs [self becomeFirstResponder] and cause some kind of loop.

@thermogl
Copy link
Owner

thermogl commented Oct 4, 2013

Great stuff, this is all really helpful. Thanks.

nagrao added a commit to nagrao/TITokenField that referenced this issue Oct 15, 2013
thermogl added a commit that referenced this issue Oct 15, 2013
fix for #61. No reason to shift focus to tokenField
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants