Skip to content

Commit

Permalink
[TIMOB-11250](2_1_X)Fix incorrect focus on tableview data reload
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalduggal committed Oct 5, 2012
1 parent dd5031d commit 4017973
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion iphone/Classes/TiUITableView.m
Original file line number Diff line number Diff line change
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 4017973

Please sign in to comment.