diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 23b190db0629..bade843dd95f 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -6607,7 +6607,8 @@ nsIFrame::IsFocusable(PRInt32 *aTabIndex, PRBool aWithMouse) // will be enough to make them keyboard scrollable. nsIScrollableFrame *scrollFrame = do_QueryFrame(this); if (scrollFrame && - scrollFrame->GetActualScrollbarSizes() != nsMargin(0,0,0,0)) { + scrollFrame->GetScrollbarStyles() != nsIScrollableFrame::ScrollbarStyles(NS_STYLE_OVERFLOW_HIDDEN, NS_STYLE_OVERFLOW_HIDDEN) && + !scrollFrame->GetScrollRange().IsEqualEdges(nsRect(0, 0, 0, 0))) { // Scroll bars will be used for overflow isFocusable = PR_TRUE; tabIndex = 0;