FIXED: The firstResponder state of a table dataView was not correctly removed on dismiss. fixes #2310

This commit is contained in:
cacaodev
2015-02-15 11:00:25 +01:00
parent 7c4cdef66d
commit 2d2472dbe9
+5 -4
View File
@@ -5108,15 +5108,16 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
[self getColumn:@ref(column) row:@ref(row) forView:responder];
if (row == CPNotFound && column == CPNotFound)
[self _notifyViewDidResignFirstResponder];
_editingRow = row;
_editingColumn = column;
// We want to keep the 'First Responder' theme state for the table view as a whole, even when a subview is being edited.
// This makes sure the theming effects of a focused table remain in effect even as cells are being edited in it.
[self _notifyViewDidBecomeFirstResponder];
// Check if the firstResponder is outside the tableview:
if (responder !== self && _editingRow == CPNotFound && _editingColumn == CPNotFound)
[self _notifyViewDidResignFirstResponder];
else
[self _notifyViewDidBecomeFirstResponder];
// This is for cell-based tables only. In view-based mode, we do not change the textfield apprearence during an edit.
if (!_isViewBased && _editingRow !== CPNotFound && [responder isKindOfClass:[CPTextField class]] && [responder isEditable])