mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 03:03:50 +00:00
Fix for -nextValidKeyView infinitely looping when no next valid key view.
Closes #1049. Reviewed by me.
This commit is contained in:
1 parent
b3e0c4a5d5
commit
2d46fb885d
1 file changed
+8
-1
+8
-1
@@ -2145,11 +2145,18 @@ setBoundsOrigin:
|
||||
|
||||
- (CPView)nextValidKeyView
|
||||
{
|
||||
var result = [self nextKeyView];
|
||||
var result = [self nextKeyView],
|
||||
firstResult = result;
|
||||
|
||||
while (result && ![result canBecomeKeyView])
|
||||
{
|
||||
result = [result nextKeyView];
|
||||
|
||||
// Cycled.
|
||||
if (result === firstResult)
|
||||
return nil;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user