From 781d71acfa8931e6973908a2ce9ea2623c6f492b Mon Sep 17 00:00:00 2001 From: Thomas Parslow Date: Mon, 24 Aug 2015 12:03:59 +0100 Subject: [PATCH] Turn pending text into a token before collapsing Entering some text then tapping elsewhere on the interface should not lose the text. --- VENTokenField/VENTokenField.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VENTokenField/VENTokenField.m b/VENTokenField/VENTokenField.m index e4de2b5..8be18db 100644 --- a/VENTokenField/VENTokenField.m +++ b/VENTokenField/VENTokenField.m @@ -110,6 +110,10 @@ - (void)setUpInit - (void)collapse { + VENBackspaceTextField *textField = [self inputTextField]; + if ([textField.text length]) { + [self.delegate tokenField:self didEnterText:textField.text]; + } [self layoutCollapsedLabel]; }