| Index: chrome/browser/tab_contents/tab_contents_view_mac.mm
|
| ===================================================================
|
| --- chrome/browser/tab_contents/tab_contents_view_mac.mm (revision 14963)
|
| +++ chrome/browser/tab_contents/tab_contents_view_mac.mm (working copy)
|
| @@ -126,8 +126,14 @@
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| +// This is called when we the renderer asks us to take focus back (i.e., it has
|
| +// iterated past the last focusable element on the page).
|
| void TabContentsViewMac::TakeFocus(bool reverse) {
|
| - [cocoa_view_.get() becomeFirstResponder];
|
| + if (reverse) {
|
| + [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()];
|
| + } else {
|
| + [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()];
|
| + }
|
| }
|
|
|
| void TabContentsViewMac::HandleKeyboardEvent(
|
|
|