Have to set explicit focus to a page by clicking on it, after clicking Back. b=504450 r=josh

This commit is contained in:
Steven Michaud 2009-08-13 15:20:25 -05:00
Родитель 0becbc9bef
Коммит d37912b315
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -1039,9 +1039,14 @@ NS_IMETHODIMP nsChildView::SetFocus(PRBool aRaise)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
NSWindow* window = [mView window];
if (window)
[window makeFirstResponder:mView];
// Don't so anything if we're invisible (if Show(PR_FALSE) has been
// called on us, or if Show(PR_TRUE) hasn't yet been called). This
// resolves bug 504450.
if (mView && ![mView isHidden]) {
NSWindow* window = [mView window];
if (window)
[window makeFirstResponder:mView];
}
return NS_OK;
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;