Skip to content

Commit

Permalink
Merge pull request #3119 from vishalduggal/timob-11250-21X
Browse files Browse the repository at this point in the history
[TIMOB-11250](2_1_X)Fix incorrect focus on tableview data reload
  • Loading branch information
srahim committed Oct 5, 2012
2 parents dd5031d + 4017973 commit 61edac4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion iphone/Classes/TiUITableView.m
Expand Up @@ -598,6 +598,7 @@ -(void)dispatchAction:(TiUITableViewAction*)action
BOOL reloadSearch = NO;

TiViewProxy<TiKeyboardFocusableView> * chosenField = [[[TiApp controller] keyboardFocusedProxy] retain];
BOOL hasFocus = [chosenField focused];
BOOL oldSuppress = [chosenField suppressFocusEvents];
[chosenField setSuppressFocusEvents:YES];
switch (action.type)
Expand Down Expand Up @@ -768,7 +769,10 @@ -(void)dispatchAction:(TiUITableViewAction*)action
break;
}
}
[chosenField focus:nil];
if (hasFocus) {
[chosenField focus:nil];
}

[chosenField setSuppressFocusEvents:oldSuppress];
[chosenField release];

Expand Down

0 comments on commit 61edac4

Please sign in to comment.