diff options
Diffstat (limited to 'Source/SPTableView.m')
-rw-r--r-- | Source/SPTableView.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/SPTableView.m b/Source/SPTableView.m index c3f76baf..aa0b5067 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -89,7 +89,7 @@ { // Check if ENTER or RETURN is hit and edit the column. - if([self numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76)) + if ([self numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76)) { if([[[[self delegate] class] description] isEqualToString:@"SPFieldMapperController"]) { @@ -126,6 +126,12 @@ } } + + // Check if ESCAPE is hit and use it to cancel row editing if supported + else if ([theEvent keyCode] == 53 && [[self delegate] respondsToSelector:@selector(cancelRowEditing)]) + { + if ([[self delegate] cancelRowEditing]) return; + } [super keyDown:theEvent]; |