@@ -4303,9 +4303,7 @@ nsresult nsFocusManager::GetNextTabbableContent(
4303
4303
4304
4304
// Stepping out popover scope.
4305
4305
// For forward, search for the next tabbable content after invoker.
4306
- // For backward, we should get back to the invoker if the invoker is
4307
- // focusable. Otherwise search for the next tabbable content after
4308
- // invoker.
4306
+ // For backward, we should get back to the invoker.
4309
4307
if (oldTopLevelScopeOwner &&
4310
4308
IsOpenPopoverWithInvoker (oldTopLevelScopeOwner) &&
4311
4309
currentTopLevelScopeOwner != oldTopLevelScopeOwner) {
@@ -4329,21 +4327,12 @@ nsresult nsFocusManager::GetNextTabbableContent(
4329
4327
return rv;
4330
4328
}
4331
4329
}
4332
- } else if (invokerContent) {
4333
- nsIFrame* frame = invokerContent->GetPrimaryFrame ();
4334
- if (frame && frame->IsFocusable ()) {
4335
- invokerContent.forget (aResultContent);
4336
- return NS_OK;
4337
- }
4338
- nsIContent* contentToFocus = GetNextTabbableContentInScope (
4339
- currentTopLevelScopeOwner, invokerContent,
4340
- aOriginalStartContent, aForward, 0 , aIgnoreTabIndex,
4341
- aForDocumentNavigation, aNavigateByKey, false /* aSkipOwner */ ,
4342
- aReachedToEndForDocumentNavigation);
4343
- if (contentToFocus) {
4344
- NS_ADDREF (*aResultContent = contentToFocus);
4345
- return NS_OK;
4346
- }
4330
+ } else if (invokerContent &&
4331
+ invokerContent->IsFocusableWithoutStyle ()) {
4332
+ // FIXME(emilio): The check above should probably use
4333
+ // nsIFrame::IsFocusable, not IsFocusableWithoutStyle.
4334
+ invokerContent.forget (aResultContent);
4335
+ return NS_OK;
4347
4336
}
4348
4337
}
4349
4338
}
0 commit comments