mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 19:23:50 +00:00
FIXED: crash when a cell based table view contains a dataview that contains an editable text field
Previously, CPTableView was listening to all end editing notifications in cell-based mode. This caused a crash if the textfield is an actually subview of a dataview. This patch ensures to listen only editing did end notification for direct subview of tableView.
This commit is contained in:
1 parent
7c17d5bac0
commit
6420a51dd0
1 file changed
+1
-1
@@ -5199,7 +5199,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
[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])
|
||||
if (!_isViewBased && _editingRow !== CPNotFound && [responder isKindOfClass:[CPTextField class]] && [responder isEditable] && [responder superview] == self)
|
||||
{
|
||||
[responder setBezeled:YES];
|
||||
[self _registerForEndEditingNote:responder];
|
||||
|
||||
Reference in new issue
Block a user