Skip to content

Commit

Permalink
Dismiss keyboard when there's no text. Fixes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Jul 29, 2012
1 parent af1e24c commit 47724b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changelog.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

✔ Remembers selected list across launches

✔ Finish adding tasks by pressing Go with an empty task

☂ Bug fixes


Expand Down
1 change: 1 addition & 0 deletions Classes/CDIAddTaskView.m
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ - (void)textFieldDidEndEditing:(UITextField *)textField {

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField.text.length == 0) {
[textField resignFirstResponder];
return NO;
}

Expand Down
1 change: 1 addition & 0 deletions Classes/CDIListsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ - (void)_createList:(id)sender {
CDIAddListTableViewCell *cell = (CDIAddListTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
UITextField *textField = cell.textField;
if (textField.text.length == 0) {
[self _cancelAddingList:nil];
return;
}

Expand Down

0 comments on commit 47724b7

Please sign in to comment.