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

TITokenField scroll to the last token #35

Open
voicecho opened this issue Aug 21, 2012 · 5 comments
Open

TITokenField scroll to the last token #35

voicecho opened this issue Aug 21, 2012 · 5 comments
Assignees
Labels

Comments

@voicecho
Copy link

If there are many tokens in the token filed, it can be scrolled. The token field will scroll to the last token position whenever one of the token is touched. How could i forbid this? As the touched token could be scrolled out of the view, it is not that user friendly.

@thermogl
Copy link
Owner

Should be just a matter of adding a scrollRectToVisible call. I'll take a look.

@ghost ghost assigned thermogl Aug 21, 2012
@voicecho
Copy link
Author

I don't think so. You did not call scrollRectToVisible at all. I think it is because you setText in both selectToken: and deselectSelectedToken: methods in TITokenFIeld.m. Actually I wanna use TITokenFIeld to get a receiver select view in the Sparrow.app. It is good but problem is that i can't control the scrolling of the token field view.

@thermogl
Copy link
Owner

Right, but hopefully adding a scrollRectToVisible call when selecting a token should override the behaviour of the editing rect being scrolled into view by the OS. I haven't had a chance to play with it yet, though.

@scottliu1234
Copy link

The cause of this is the call [self setText:kTextHidden] in selectToken and [self setText:kTextEmpty] in deselectToken. The good way is to not call those lines and then use self.selectedToken == nil as a flag elsewhere to check for conditions for shouldRemove, etc.

@thermogl
Copy link
Owner

We need kTextEmpty to capture backspaces, but I'll look into replacing kTextHidden.

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

3 participants